Export (0) Print
Expand All
Expand Minimize

XmlNodeType Enumeration

Specifies the type of node.

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public enum class XmlNodeType

Member nameDescription
Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsAttributeAn attribute (for example, 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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsCDATAA CDATA section (for example, <![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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsCommentA comment (for example, <!-- my comment --> ).

A Comment node cannot have any child nodes. It can appear as the child of the Document, DocumentFragment, Element, and EntityReference nodes.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsDocumentA 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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsDocumentFragmentA 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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsDocumentTypeThe document type declaration, indicated by the following tag (for example, <!DOCTYPE...> ).

A DocumentType node can have the following child node types: Notation and Entity. It can appear as the child of the Document node.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsElementAn element (for example, <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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsEndElementAn end element tag (for example, </item> ).

EndElement nodes are returned when XmlReader gets to the end of an element.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsEndEntityReturned when XmlReader gets to the end of the entity replacement as a result of a call to ResolveEntity.
Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsEntityAn entity declaration (for example, <!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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsEntityReferenceA reference to an entity (for example, &num; ).

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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsNoneThis is returned by the XmlReader if a Read method has not been called.
Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsNotationA notation in the document type declaration (for example, <!NOTATION...> ).

A Notation node cannot have any child nodes. It can appear as the child of the DocumentType node.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsProcessingInstructionA processing instruction (for example, <?pi test?> ).

A ProcessingInstruction node cannot have any child nodes. It can appear as the child of the Document, DocumentFragment, Element, and EntityReference nodes.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsSignificantWhitespaceWhite space between markup in a mixed content model or white space within the xml:space="preserve" scope.
Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsTextThe 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.

Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsWhitespaceWhite space between markup.
Supported by the XNA FrameworkSupported by Portable Class LibrarySupported in .NET for Windows Store appsXmlDeclarationThe XML declaration (for example, <?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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft