• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

basic doubt: doc element and doc root

 
Sridhar Kilambi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell the differnce between doc element and doc root in the below sample xml
<?xml version='1.0 ?>
<computers>
<price ID="223" currency="USD"> 122.20</price>
<manufacturedat> "MEXICO"</manufacturedat>
<basicConfiguration Included="YES">
<RAM Option="GB"> 2.0</RAM>
<HardDisk Option="GB"> 80</HardDisk>
<Memory option="MHz"> 5000</Memory>
</basicConfiguration>
</computers>
ProXml 2e says document root and doc element are different. each body can contain only one and only one document root. and also document root and document element are different and that element root term is a misnomer.
can any one explain (as detail as possible).
any link (other than pro XML 2e and developmentor) will help.thanks for ur time.

sridhar
--------------------------------------------
aspirant for xml 141 certification.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html
The XPath data model has several inobvious features. First, the tree's root node is not the same as its root element. The tree's root node contains the entire document, including the root element and comments and processing instructions that occur before the root element start tag or after the root element end tag. In Example 9-1, the root node contains the xml-stylesheet processing instruction and the root element people.

Cheers,
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic