Mono Class Library: System.Xml NamespaceSystem.Xml.XmlNodeType Enumeration |
|
A given set of XML data is modeled as a tree of nodes. This enumeration specifies the different node types. [Edit]
Member Name Description Attribute 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 .
[Edit]CDATA A CDATA section.
Example XML: <![CDATA[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.
[Edit]Comment A comment.
Example XML: <!-- comment -->
A Comment node cannot have any child nodes. It can appear as the child of the Document, DocumentFragment, Element, and EntityReference nodes.
[Edit]Document 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.
[Edit]DocumentFragment A document fragment.
The DocumentFragment node associates a node or sub-tree 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.
[Edit]DocumentType 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.
[Edit]Element An element.
Example XML: <name>
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. [Edit]EndElement An end element.
Example XML: </name>
Returned when System.Xml.XmlReader gets to the end of an element.
[Edit]EndEntity Returned when System.Xml.XmlReader gets to the end of the entity replacement as a result of a call to XmlReader.ResolveEntity . [Edit] Entity 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.
[Edit]EntityReference 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.
[Edit]None This is returned by the System.Xml.XmlReader if a read method has not been called or if no more nodes are available to be read. [Edit] Notation 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.
[Edit]ProcessingInstruction 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.
[Edit]SignificantWhitespace White space between markup in a mixed content model or white space within the xml:space="preserve" scope. [Edit] Text 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.
[Edit]Whitespace White space between markup. [Edit] XmlDeclaration 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.
[Edit]
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0