basic XML question re: Xerces 2003-02-12 - By Andy Clark
Swanson, Brion wrote: > I just ran sax.Counter (Xerces 2.2.0) with the following input file: > > <root> > <temp> > <root/> > </temp> > </root> > > It worked completely fine and did not throw a SAXParseException. Is this a > well-formed document? I would think not based on the W3C definition: > > [Definition: There is exactly one element, called the root, or document > element, no part of which appears in the content of any other element.]
Your sample document *does* only have a single root element. However, other elements can appear in the document with the same *name* as the root element's.
-- Andy Clark * andyc@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|