The Labs \ Source Viewer \ SSCLI \ System.Xml \ XmlNodeType

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlNodeType.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Xml
  16. {
  17.     /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType"]/*' />
  18.     /// <devdoc>
  19.     /// Specifies the type of node.
  20.     /// </devdoc>
  21.     public enum XmlNodeType
  22.     {
  23.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.None"]/*' />
  24.         /// <devdoc>
  25.         /// For XPathNavigator, cursor is not positioned
  26.         /// on a node.
  27.         /// </devdoc>
  28.         None,
  29.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Element"]/*' />
  30.         /// <devdoc>
  31.         /// <para>
  32.         /// An Element.
  33.         /// </para>
  34.         /// <para>
  35.         /// Example XML: &lt;Name&gt;
  36.         /// </para>
  37.         /// An Element node can have
  38.         /// the following child node types: Element, Text, Comment, ProcessingInstruction,
  39.         /// CDATA, and EntityReference. The Element node can be the child of the Document,
  40.         /// DocumentFragment, EntityReference, and Element nodes.
  41.         /// </devdoc>
  42.         Element,
  43.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Attribute"]/*' />
  44.         /// <devdoc>
  45.         /// <para>
  46.         /// An
  47.         /// Attribute.
  48.         /// </para>
  49.         /// <para>
  50.         /// Example XML: id='123'
  51.         /// </para>
  52.         /// <para>
  53.         /// An Attribute node can have the following child node types: Text and
  54.         /// EntityReference. The Attribute node does not appear as the child node of any
  55.         /// other node type; note that it is not considered a child node of an Element.
  56.         /// </para>
  57.         /// </devdoc>
  58.         Attribute,
  59.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Text"]/*' />
  60.         /// <devdoc>
  61.         /// <para>
  62.         /// The
  63.         /// text content of an element.
  64.         /// </para>
  65.         /// <para>
  66.         /// A Text node cannot have any child nodes. The Text node can appear as the
  67.         /// child node of the Attribute, DocumentFragment, Element, and EntityReference
  68.         /// nodes.
  69.         /// </para>
  70.         /// </devdoc>
  71.         Text,
  72.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.CDATA"]/*' />
  73.         /// <devdoc>
  74.         /// A CDATA section.
  75.         /// Example XML: &lt;![CDATA[my escaped text]]&gt;
  76.         /// CDATA sections are used to escape blocks of text that would otherwise be
  77.         /// recognized as markup. A CDATASection node cannot have any child nodes. The
  78.         /// CDATASection node can appear as the child of the DocumentFragment,
  79.         /// EntityReference, and Element nodes.
  80.         /// </devdoc>
  81.         CDATA,
  82.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.EntityReference"]/*' />
  83.         /// <devdoc>
  84.         /// <para>A reference to an entity.</para>
  85.         /// <para>Example XML: &amp;foo;</para>
  86.         /// <para>This applies to all entities, including character entity references. An
  87.         /// EntityReference node can have the following child node types: Element,
  88.         /// ProcessingInstruction, Comment, Text, CDATASection, and EntityReference. The
  89.         /// EntityReference node can appear as the child of the Attribute, DocumentFragment,
  90.         /// Element, and EntityReference nodes.</para>
  91.         /// </devdoc>
  92.         EntityReference,
  93.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Entity"]/*' />
  94.         /// <devdoc>
  95.         /// <para>An entity declaration.</para>
  96.         /// <para>Example XML: &lt;!ENTITY ...&gt;</para>
  97.         /// <para>An Entity node can have child nodes that represent the expanded entity (for
  98.         /// example, Text and EntityReference nodes). The Entity node can appear as the
  99.         /// child of the DocumentType node.</para>
  100.         /// </devdoc>
  101.         Entity,
  102.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.ProcessingInstruction"]/*' />
  103.         /// <devdoc>
  104.         /// <para>
  105.         /// A processing instruction (PI).
  106.         /// </para>
  107.         /// <para>
  108.         /// Example XML: &lt;?pi test?&gt;
  109.         /// </para>
  110.         /// <para>
  111.         /// A PI node cannot have any child nodes. The PI node can
  112.         /// appear as the child of the Document, DocumentFragment, Element, and
  113.         /// EntityReference nodes.
  114.         /// </para>
  115.         /// </devdoc>
  116.         ProcessingInstruction,
  117.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Comment"]/*' />
  118.         /// <devdoc>
  119.         /// <para>
  120.         /// A Comment.
  121.         /// </para>
  122.         /// <para>
  123.         /// Example XML: &lt;!-- my comment --&gt;
  124.         /// </para>
  125.         /// <para>
  126.         /// A Comment node cannot have any child nodes. The Comment node can appear as
  127.         /// the child of the Document, DocumentFragment, Element, and EntityReference
  128.         /// nodes.
  129.         /// </para>
  130.         /// </devdoc>
  131.         Comment,
  132.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Document"]/*' />
  133.         /// <devdoc>
  134.         /// <para>
  135.         /// A document object, which, as the root of the document tree, provides access
  136.         /// to the entire XML document.
  137.         /// </para>
  138.         /// <para>
  139.         /// A Document node can have the following child node types: Element (maximum of
  140.         /// one), ProcessingInstruction, Comment, and DocumentType. The Document node cannot
  141.         /// appear as the child of any node types.
  142.         /// </para>
  143.         /// </devdoc>
  144.         Document,
  145.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.DocumentType"]/*' />
  146.         /// <devdoc>
  147.         /// <para>
  148.         /// The document type declaration, indicated by the &lt;!DOCTYPE&gt; tag.
  149.         /// </para>
  150.         /// <para>
  151.         /// Example XML: &lt;!DOCTYPE ...&gt;
  152.         /// </para>
  153.         /// <para>
  154.         /// A DocumentType node can have the following child node types: Notation and
  155.         /// Entity. The DocumentType node can appear as the child of the Document node.
  156.         /// </para>
  157.         /// </devdoc>
  158.         DocumentType,
  159.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.DocumentFragment"]/*' />
  160.         /// <devdoc>
  161.         /// <para>
  162.         /// A document fragment.
  163.         /// </para>
  164.         /// <para>
  165.         /// The DocumentFragment node associates a node or subtree with a document
  166.         /// without actually being contained within the document. A DocumentFragment node
  167.         /// can have the following child node types: Element, ProcessingInstruction,
  168.         /// Comment, Text, CDATASection, and EntityReference. The DocumentFragment node
  169.         /// cannot appear as the child of any node types.
  170.         /// </para>
  171.         /// </devdoc>
  172.         DocumentFragment,
  173.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Notation"]/*' />
  174.         /// <devdoc>
  175.         /// <para>
  176.         /// A notation in the document type declaration.
  177.         /// </para>
  178.         /// <para>
  179.         /// Example XML: &lt;!NOTATION ...&gt;
  180.         /// </para>
  181.         /// <para>
  182.         /// A Notation node cannot have any child nodes. The Notation node can appear as
  183.         /// the child of the DocumentType node.
  184.         /// </para>
  185.         /// </devdoc>
  186.         Notation,
  187.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.Whitespace"]/*' />
  188.         /// <devdoc>
  189.         /// <para>
  190.         /// Whitespace between markup.
  191.         /// </para>
  192.         /// </devdoc>
  193.         Whitespace,
  194.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.SignificantWhitespace"]/*' />
  195.         /// <devdoc>
  196.         /// <para>
  197.         /// Whitespace between markup in a mixed content model.
  198.         /// </para>
  199.         /// </devdoc>
  200.         SignificantWhitespace,
  201.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.EndElement"]/*' />
  202.         /// <devdoc>
  203.         /// <para>Returned when XmlReader gets to the end of an element.</para>
  204.         /// <para>Example XML: &lt;/foo&gt;</para>
  205.         /// </devdoc>
  206.         EndElement,
  207.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.EndEntity"]/*' />
  208.         /// <devdoc>
  209.         /// <para>Returned when XmlReader gets to the end of the entity
  210.         /// replacement as a result of a call to <see cref='System.Xml.XmlReader.ResolveEntity'/>
  211.         /// .</para>
  212.         /// </devdoc>
  213.         EndEntity,
  214.         /// <include file='doc\XmlNodeType.uex' path='docs/doc[@for="XmlNodeType.XmlDeclaration"]/*' />
  215.         /// <devdoc>
  216.         /// <para>
  217.         /// The XML declaration node..
  218.         /// </para>
  219.         /// <para>
  220.         /// Example XML: &lt;?xml version='1.0'?&gt;;
  221.         /// </para>
  222.         /// <para>
  223.         /// This has to be the first node in the document. It can have no children.
  224.         /// It is a child of the root node. It can have attributes that provide version
  225.         /// and encoding information.
  226.         /// </para>
  227.         /// </devdoc>
  228.         XmlDeclaration
  229.     }
  230. }

Developer Fusion