Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

enum System.​Xml.​XmlNodeType

Assembly: System.Xml.ReaderWriter

Specifies the type of node.

Values

None
This is returned by the <see cref="T:System.Xml.XmlReader" /> if a <see langword="Read" /> method has not been called.
Element
An element (for example, <c>&lt;item&gt;</c> ).
Attribute
An attribute (for example, <c>id='123'</c> ).
Text
<para>The text content of a node.</para> <para>A <see cref="F:System.Xml.XmlNodeType.Text" /> node cannot have any child nodes. It can appear as the child node of the <see cref="F:System.Xml.XmlNodeType.Attribute" />, <see cref="F:System.Xml.XmlNodeType.DocumentFragment" />, <see cref="F:System.Xml.XmlNodeType.Element" />, and <see cref="F:System.Xml.XmlNodeType.EntityReference" /> nodes.</para>
CDATA
A CDATA section (for example, <c>&lt;![CDATA[my escaped text]]&gt;</c> ).
EntityReference
A reference to an entity (for example, <c>&amp;num;</c> ).
Entity
An entity declaration (for example, <c>&lt;!ENTITY...&gt;</c> ).
ProcessingInstruction
A processing instruction (for example, <c>&lt;?pi test?&gt;</c> ).
Comment
A comment (for example, <c>&lt;!-- my comment --&gt;</c> ).
Document
A document object that, as the root of the document tree, provides access to the entire XML document.
DocumentType
The document type declaration, indicated by the following tag (for example, <c>&lt;!DOCTYPE...&gt;</c> ).
DocumentFragment
A document fragment.
Notation
A notation in the document type declaration (for example, <c>&lt;!NOTATION...&gt;</c> ).
Whitespace
White space between markup.
SignificantWhitespace
White space between markup in a mixed content model or white space within the <c>xml:space="preserve"</c> scope.
EndElement
An end element tag (for example, <c>&lt;/item&gt;</c> ).
EndEntity
Returned when <see langword="XmlReader" /> gets to the end of the entity replacement as a result of a call to <see cref="M:System.Xml.XmlReader.ResolveEntity" /> .
XmlDeclaration
<para>The XML declaration (for example, <c>&lt;?xml version='1.0'?&gt;</c> ).</para> <para>The <see cref="F:System.Xml.XmlNodeType.XmlDeclaration" /> node must be the first node in the document. It cannot have children. It is a child of the <see cref="F:System.Xml.XmlNodeType.Document" /> node. It can have attributes that provide version and encoding information.</para>