[EMAIL PROTECTED] wrote: > It seem strange though (inconsistent) that I can serialize it > through a socket when I can't parse it from a socket. If I recall > from the XML spec correctly, I believe only one root node is > allowed in a document. If thats correct, couldn't Xerces use that > to (at least in v2) complete the parsing and return control to the > calling application?
No. The XML specification defines the document as the following: [1] document ::= prolog element Misc* Notice after the document root "element", a well-formed XML document is allowed to have zero or more "Misc" items which is defined to be: [27] Misc ::= Comment | PI | S Since there can be additional structures in the document like comments and processing instructions that appear after the document root element, the parser cannot just stop after the closing root element tag and act as if the next part is a new document. If it did, then the parser would not conform to the XML specification. -- Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
