[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: well-formedness error




<snip>



I think allowing ill-formed XML spreading around is much, much worse than
allowing for some bad HTTP headers now and then. The headers at least
don't force one to use regex and other evil methods to parse XML.
Everything contained in the XML document should be well-formed according
to XML specs. XML over HTTP is another ballgame, but Atom should still
state how things should be done -- in a non-lenient way.

I'll point out again that I handle bad XML (not missing tags, but a lot of other errors) in BottomFeeder - and I have not


-- written a custom parser
-- do not use Regex
-- do not use the Universal Parser

There are a lot of wild assumptions floating around as to what has to be done in order to handle errors in XML - I spent a few minutes on this problem many months ago, and haven't so much as looked at that code since.

I use the stock parser that ships with VisualWorks (the tool I use to build BottomFeeder) - and I simply subclassed the parser and overrode a few methods. Generally speaking, that meant changing places the parser raised an error and bailed to error logging and continuing.

I spent an aggregate total of maybe 15 minutes on this entire problem, broken up into a handful of 3-5 minute sessions over the course of a few months.....

____
[1] <url: http://www.intertwingly.net/wiki/pie/PaceServiceError>

--
Asbjørn Ulsberg         -=|=-        asbjornu@xxxxxxxxxxx
«He's a loathsome offensive brute, yet I can't look away»



<Talk Small and Carry a Big Class Library>
James Robertson, Product Manager, Cincom Smalltalk
http://www.cincomsmalltalk.com/blog/blogView
jarober@xxxxxxxxxxxxxxx