from the XML specification at http://www.w3.org/TR/REC-xml/ (fifth edition) chapter 2
It says
"Each XML document has both logical and physical structure. Physically, a document consists of units called objects. An entity can refer to other objects to cause them to be included in the document. The document begins with" root ", or the document object."
"[Definition: there is only one element, called the root or document element, no part of which appears in the contents of any other element.] For all other elements, if the start tag is in the content of another element, the end tag is in the content of the same element Simply put, elements bounded by start and end tags are correctly embedded in each other. "
Basically, yes, you always need one root element.
Guy
source share