On Aug 23, 2005, at 07:27, A. Pagaltzis wrote:

I still dislike the idea of a “virtual closing tag” – it ain’t
1995 anymore, after all.

You seem to be thinking that an XML parser needs to consider the whole document before reporting data to the app. This is not the case.

If you have a document that lacks the end tag, the fatal error is hit when the data stream ends. All the subtrees rooted at children of the document element will be just fine. Try it with any streaming SAX parser.

In this case, the data stream ends only if either party decides to close the connection. The parser will never know how long the document would have been. From the parsers point of view it looks like a broken stream while reading a finite doc. There's nothing in the XML spec requiring the app to throw away the data structures it has already built when the parser reports the error.

--
Henri Sivonen
[EMAIL PROTECTED]
http://hsivonen.iki.fi/

Reply via email to