XmlNodeType Enumeration
Specifies the type of node.
[Visual Basic] <Serializable> Public Enum XmlNodeType [C#] [Serializable] public enum XmlNodeType [C++] [Serializable] __value public enum XmlNodeType [JScript] public Serializable enum XmlNodeType
Members
| Member name | Description |
|---|---|
| Attribute Supported by the .NET Compact Framework. | An attribute.
Example XML: id='123' An Attribute node can have the following child node types: Text and EntityReference. The Attribute node does not appear as the child node of any other node type. It is not considered a child node of an Element. |
| CDATA Supported by the .NET Compact Framework. | A CDATA section.
Example XML: <![CDATA[my escaped text]]> CDATA sections are used to escape blocks of text that would otherwise be recognized as markup. A CDATA node cannot have any child nodes. It can appear as the child of the DocumentFragment, EntityReference, and Element nodes. |
| Comment Supported by the .NET Compact Framework. | A comment.
Example XML: <!-- my comment --> A Comment node cannot have any child nodes. It can appear as the child of the Document, DocumentFragment, Element, and EntityReference nodes. |
| Document Supported by the .NET Compact Framework. | A document object that, as the root of the document tree, provides access to the entire XML document.
A Document node can have the following child node types: XmlDeclaration, Element (maximum of one), ProcessingInstruction, Comment, and DocumentType. It cannot appear as the child of any node types. |
| DocumentFragment Supported by the .NET Compact Framework. | A document fragment.
The DocumentFragment node associates a node or subtree with a document without actually being contained within the document. A DocumentFragment node can have the following child node types: Element, ProcessingInstruction, Comment, Text, CDATA, and EntityReference. It cannot appear as the child of any node types. |
| DocumentType Supported by the .NET Compact Framework. | The document type declaration, indicated by the following tag.
Example XML: <!DOCTYPE ...> A DocumentType node can have the following child node types: Notation and Entity. It can appear as the child of the Document node. |
| Element Supported by the .NET Compact Framework. | An element.
Example XML: <item> An Element node can have the following child node types: Element, Text, Comment, ProcessingInstruction, CDATA, and EntityReference. It can be the child of the Document, DocumentFragment, EntityReference, and Element nodes. |
| EndElement Supported by the .NET Compact Framework. | An end element tag.
Example XML: </item> Returned when XmlReader gets to the end of an element. |
| EndEntity Supported by the .NET Compact Framework. | Returned when XmlReader gets to the end of the entity replacement as a result of a call to ResolveEntity. |
| Entity Supported by the .NET Compact Framework. | An entity declaration.
Example XML: <!ENTITY ...> An Entity node can have child nodes that represent the expanded entity (for example, Text and EntityReference nodes). It can appear as the child of the DocumentType node. |
| EntityReference Supported by the .NET Compact Framework. | A reference to an entity.
Example XML: # An EntityReference node can have the following child node types: Element, ProcessingInstruction, Comment, Text, CDATA, and EntityReference. It can appear as the child of the Attribute, DocumentFragment, Element, and EntityReference nodes. |
| None Supported by the .NET Compact Framework. | This is returned by the XmlReader if a Read method has not been called. |
| Notation Supported by the .NET Compact Framework. | A notation in the document type declaration.
Example XML: <!NOTATION ...> A Notation node cannot have any child nodes. It can appear as the child of the DocumentType node. |
| ProcessingInstruction Supported by the .NET Compact Framework. | A processing instruction.
Example XML: <?pi test?> A ProcessingInstruction node cannot have any child nodes. It can appear as the child of the Document, DocumentFragment, Element, and EntityReference nodes. |
| SignificantWhitespace Supported by the .NET Compact Framework. | White space between markup in a mixed content model or white space within the xml:space="preserve" scope. |
| Text Supported by the .NET Compact Framework. | The text content of a node.
A Text node cannot have any child nodes. It can appear as the child node of the Attribute, DocumentFragment, Element, and EntityReference nodes. |
| Whitespace Supported by the .NET Compact Framework. | White space between markup. |
| XmlDeclaration Supported by the .NET Compact Framework. | The XML declaration.
Example XML: <?xml version='1.0'?> The XmlDeclaration node must be the first node in the document. It cannot have children. It is a child of the Document node. It can have attributes that provide version and encoding information. |
Requirements
Namespace: System.Xml
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System.Xml (in System.Xml.dll)