[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Piccolo Java SAX parser and others in the wild?
At 4:39 PM -0500 2/22/04, John Cowan wrote: >Poor QOI, but technically a parser can make demons fly out of your nose >if you feed it non-XML. That's only according to the XML spec. The SAX spec is a little more prescriptive, including a strict non-demon guarantee. :-) My reading of the SAX Javadocs says that when a parser encounters a malformed document, it must, at a minimum: 1. Call startDocument 2. Call fatalError 3. Call endDocument 4. Throw a SAXException or an IOException. All other kinds of exceptions must be wrapped in a SAXException. It may also optionally report content from before it first detected the well-formedness error by calling other methods at the appropriate locations. However 1 through 4 are required, in that order. 1 and 3 would be skipped only if the application has not registered a ContentHandler. 2 would be skipped only if the application has not registered an ErrorHandler. Depending on the document, I've seen Piccolo skip each one of these, though never all four at once. Xerces, Crimson, and Oracle fall down on #3; though they do a pretty good job with 1, 2, and 4. -- Elliotte Rusty Harold elharo@m... Effective XML (Addison-Wesley, 2003) http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|