XmlNodeType

XmlNodeType enum

Specifies the type of node.

enum class XmlNodeType

Values

NameValueDescription
None0This is returned by the XmlReader if a Read method has not been called.
Element1An element (for example, ).
Attribute2An attribute (for example, id=‘123’).
Text3The text content of a node. A XmlNodeType::Text node cannot have any child nodes. It can appear as the child node of the XmlNodeType::Attribute, XmlNodeType::DocumentFragment, XmlNodeType::Element, and XmlNodeType::EntityReference nodes.
CDATA4A CDATA section (for example, my escaped text).
EntityReference5A reference to an entity (for example, #).
Entity6An entity declaration (for example, ).
ProcessingInstruction7A processing instruction (for example, ).
Comment8A comment (for example, ****).
Document9A document object that, as the root of the document tree, provides access to the entire XML document.
DocumentType10The document type declaration, indicated by the following tag (for example, ).
DocumentFragment11A document fragment.
Notation12A notation in the document type declaration (for example, ).
Whitespace13White space between markup.
SignificantWhitespace14White space between markup in a mixed content model or white space within the xml:space="preserve" scope.
EndElement15An end element tag (for example, ****).
EndEntity16Returned when XmlReader gets to the end of the entity replacement as a result of a call to XmlReader::ResolveEntity.
XmlDeclaration17The XML declaration (for example, ). The XmlNodeType::XmlDeclaration node must be the first node in the document. It cannot have children. It is a child of the XmlNodeType::Document node. It can have attributes that provide version and encoding information.

See Also