title: What is the root node in XML?
body: <p>I was reading an ebook and it has following xml code.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;?xml-stylesheet href="sonnet.xsl" type="text/xsl"?&gt;
  &lt;?cocoon-process type="xslt"?&gt;
  &lt;!DOCTYPE sonnet [
    &lt;!ELEMENT sonnet (auth:author, title, lines)&gt;
    &lt;!ATTLIST sonnet public-domain CDATA "yes"
        type (Shakespearean | Petrarchan) "Shakespearean"&gt;
    &lt;!ELEMENT auth:author (last-name,first-name,nationality,
        year-of-birth?,year-of-death?)&gt;
    &lt;!ELEMENT last-name (#PCDATA)&gt;
    &lt;!ELEMENT first-name (#PCDATA)&gt;
    &lt;!ELEMENT nationality (#PCDATA)&gt;
    &lt;!ELEMENT year-of-birth (#PCDATA)&gt;
    &lt;!ELEMENT year-of-death (#PCDATA)&gt;
    &lt;!ELEMENT title (#PCDATA)&gt;
    &lt;!ELEMENT lines (line,line,line,line,
        line,line,line,line,line,line,line,
        line,line,line)&gt;
    &lt;!ELEMENT line (#PCDATA)&gt;
  ]&gt;
  &lt;!-- Default sonnet type is Shakespearean, the other allowable --&gt;
  &lt;!-- type is "Petrarchan." --&gt;
  &lt;sonnet type="Shakespearean"&gt;
    &lt;auth:author xmlns:auth="http://www.authors.com/"&gt;
      &lt;last-name&gt;Shakespeare&lt;/last-name&gt;
      &lt;first-name&gt;William&lt;/first-name&gt;
      &lt;nationality&gt;British&lt;/nationality&gt;
      &lt;year-of-birth&gt;1564&lt;/year-of-birth&gt;
      &lt;year-of-death&gt;1616&lt;/year-of-death&gt;
    &lt;/auth:author&gt;
    &lt;!-- Is there an official title for this sonnet? They're
    sometimes named after the first line. --&gt;
    &lt;title&gt;Sonnet 130&lt;/title&gt;
    &lt;lines&gt;
      &lt;line&gt;My mistress' eyes are nothing like the sun,&lt;/line&gt;
      &lt;line&gt;Coral is far more red than her lips red.&lt;/line&gt;
      &lt;line&gt;If snow be white, why then her breasts are dun,&lt;/line&gt;
      &lt;line&gt;If hairs be wires, black wires grow on her head.&lt;/line&gt;
      &lt;line&gt;I have seen roses damasked, red and white,&lt;/line&gt;
      &lt;line&gt;But no such roses see I in her cheeks.&lt;/line&gt;
      &lt;line&gt;And in some perfumes is there more delight&lt;/line&gt;
      &lt;line&gt;Than in the breath that from my mistress reeks.&lt;/line&gt;
      &lt;line&gt;I love to hear her speak, yet well I know&lt;/line&gt;
      &lt;line&gt;That music hath a far more pleasing sound.&lt;/line&gt;
      &lt;line&gt;I grant I never saw a goddess go,&lt;/line&gt;
      &lt;line&gt;My mistress when she walks, treads on the ground.&lt;/line&gt;
      &lt;line&gt;And yet, by Heaven, I think my love as rare&lt;/line&gt;
      &lt;line&gt;As any she belied with false compare.&lt;/line&gt;
    &lt;/lines&gt;
  &lt;/sonnet&gt;
  &lt;!-- The title of Sting's 1987 album "Nothing like the sun" is --&gt;
  &lt;!-- from line 1 of this sonnet.
  </code></pre>
  
  <p>problem is when I continue the rest of the reading I thought I have misunderstand what root element is. According to my knoweledge root node is <code>&lt;sonnet&gt;</code> node.</p>
  
  <p>But in the book I find next this</p>
  
  <blockquote>
    <p>Unlike other nodes, the root node has no parent. It always has at
    least one child, the document element. The root node also contains
    comments or processing instructions that are outside the document
    element. In our sample document, the two processing instructions named
    xmlstylesheet and cocoon-process are both children of the root node,
    as are the comment that appears before the  tag and the
    comment that appears after the  tag.</p>
  </blockquote>
  
  <p>accordning to that whole document is considered as root. If so what is ? It is clear that processing instructions and comments are not child of  node.</p>
  
  <p>do I minunderstand?</p>
  
  <p>UPdate</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt; 
  &lt;Food&gt; 
    &lt;Cateogry&gt; Vegetable&lt;/Cateogry&gt;
    &lt;Cateogry&gt; Fruits&lt;/Cateogry&gt;
    &lt;Cateogry&gt; other&lt;/Cateogry&gt;
  &lt;/Food&gt;
  </code></pre>
  
  <p>what is the root element here? isnt it food?</p>