The Root Element

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

Java APIs for XML Kick Start
By Aoyon Chowdhury, Parag Choudhary

Table of Contents
Appendix B.  XML: A Quick Tour


We'll discuss the lines between the comment entry and the <carparts> tag a little later in the appendix. The next entry of the CarParts.xml file that we'll discuss is the following root element:

<carparts> ....... </carparts> 

The root element is the top-level element of an XML document. The opening tag of the root element must be the first tag of an XML document, and the closing tag of the root element must be the last tag of the document. All other elements in the XML document must be defined completely within the root element. This implies that an XML document can have only one root element. However, other than this requirement, the root element is like any other element in an XML document. Therefore, if you are including an XML document in another XML document, the root element of the included XML document will be treated like a normal element by the XML parser.


printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
Top

[0672324342/app02lev1sec5]

 
 


JavaT APIs for XML Kick Start
JAX: Java APIs for XML Kick Start
ISBN: 0672324342
EAN: 2147483647
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net