XmlNodeReader Class
Represents a reader that provides fast, non-cached forward only access to XML data in an XmlNode.
Assembly: System.Xml (in System.Xml.dll)
The XmlNodeReader type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | XmlNodeReader | Creates an instance of the XmlNodeReader class using the specified XmlNode. |
| Name | Description | |
|---|---|---|
![]() ![]() | AttributeCount | Gets the number of attributes on the current node. (Overrides XmlReader::AttributeCount.) |
![]() ![]() | BaseURI | Gets the base URI of the current node. (Overrides XmlReader::BaseURI.) |
![]() ![]() | CanReadBinaryContent | Gets a value indicating whether the XmlNodeReader implements the binary content read methods. (Overrides XmlReader::CanReadBinaryContent.) |
![]() ![]() | CanReadValueChunk | Gets a value indicating whether the XmlReader implements the ReadValueChunk method. (Inherited from XmlReader.) |
![]() ![]() | CanResolveEntity | Gets a value indicating whether this reader can parse and resolve entities. (Overrides XmlReader::CanResolveEntity.) In XNA Framework 3.0, this member is inherited from XmlReader::CanResolveEntity. |
![]() ![]() | Depth | Gets the depth of the current node in the XML document. (Overrides XmlReader::Depth.) |
![]() ![]() | EOF | Gets a value indicating whether the reader is positioned at the end of the stream. (Overrides XmlReader::EOF.) |
![]() ![]() | HasAttributes | Gets a value indicating whether the current node has any attributes. (Overrides XmlReader::HasAttributes.) |
![]() ![]() | HasValue | Gets a value indicating whether the current node can have a Value. (Overrides XmlReader::HasValue.) |
![]() ![]() | IsDefault | Gets a value indicating whether the current node is an attribute that was generated from the default value defined in the document type definition (DTD) or schema. (Overrides XmlReader::IsDefault.) |
![]() ![]() | IsEmptyElement | Gets a value indicating whether the current node is an empty element (for example, <MyElement/>). (Overrides XmlReader::IsEmptyElement.) |
![]() ![]() | Item[Int32] | When overridden in a derived class, gets the value of the attribute with the specified index. (Inherited from XmlReader.) |
![]() ![]() | Item[String] | When overridden in a derived class, gets the value of the attribute with the specified Name. (Inherited from XmlReader.) |
![]() ![]() | Item[String, String] | When overridden in a derived class, gets the value of the attribute with the specified LocalName and NamespaceURI. (Inherited from XmlReader.) |
![]() ![]() | LocalName | Gets the local name of the current node. (Overrides XmlReader::LocalName.) |
![]() ![]() | Name | Gets the qualified name of the current node. (Overrides XmlReader::Name.) |
![]() ![]() | NamespaceURI | Gets the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned. (Overrides XmlReader::NamespaceURI.) |
![]() ![]() | NameTable | Gets the XmlNameTable associated with this implementation. (Overrides XmlReader::NameTable.) |
![]() ![]() | NodeType | Gets the type of the current node. (Overrides XmlReader::NodeType.) |
![]() ![]() | Prefix | Gets the namespace prefix associated with the current node. (Overrides XmlReader::Prefix.) |
![]() ![]() | QuoteChar | When overridden in a derived class, gets the quotation mark character used to enclose the value of an attribute node. (Inherited from XmlReader.) |
![]() ![]() | ReadState | Gets the state of the reader. (Overrides XmlReader::ReadState.) |
![]() ![]() | SchemaInfo | Gets the schema information that has been assigned to the current node. (Overrides XmlReader::SchemaInfo.) |
![]() ![]() | Settings | Gets the XmlReaderSettings object used to create this XmlReader instance. (Inherited from XmlReader.) |
![]() ![]() | Value | Gets the text value of the current node. (Overrides XmlReader::Value.) |
![]() ![]() | ValueType | Gets The Common Language Runtime (CLR) type for the current node. (Inherited from XmlReader.) |
![]() ![]() | XmlLang | Gets the current xml:lang scope. (Overrides XmlReader::XmlLang.) |
![]() ![]() | XmlSpace | Gets the current xml:space scope. (Overrides XmlReader::XmlSpace.) |
| Name | Description | |
|---|---|---|
![]() ![]() | Close | Changes the ReadState to Closed. (Overrides XmlReader::Close().) |
![]() ![]() | Dispose(Boolean) | Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources. (Inherited from XmlReader.) |
![]() ![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetAttribute(Int32) | Gets the value of the attribute with the specified index. (Overrides XmlReader::GetAttribute(Int32).) |
![]() ![]() | GetAttribute(String) | Gets the value of the attribute with the specified name. (Overrides XmlReader::GetAttribute(String).) |
![]() ![]() | GetAttribute(String, String) | Gets the value of the attribute with the specified local name and namespace URI. (Overrides XmlReader::GetAttribute(String, String).) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | IsStartElement() | Calls MoveToContent and tests if the current content node is a start tag or empty element tag. (Inherited from XmlReader.) |
![]() ![]() | IsStartElement(String) | Calls MoveToContent and tests if the current content node is a start tag or empty element tag and if the Name property of the element found matches the given argument. (Inherited from XmlReader.) |
![]() ![]() | IsStartElement(String, String) | Calls MoveToContent and tests if the current content node is a start tag or empty element tag and if the LocalName and NamespaceURI properties of the element found match the given strings. (Inherited from XmlReader.) |
![]() ![]() | LookupNamespace | Resolves a namespace prefix in the current element's scope. (Overrides XmlReader::LookupNamespace(String).) |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | MoveToAttribute(Int32) | Moves to the attribute with the specified index. (Overrides XmlReader::MoveToAttribute(Int32).) |
![]() ![]() | MoveToAttribute(String) | Moves to the attribute with the specified name. (Overrides XmlReader::MoveToAttribute(String).) |
![]() ![]() | MoveToAttribute(String, String) | Moves to the attribute with the specified local name and namespace URI. (Overrides XmlReader::MoveToAttribute(String, String).) |
![]() ![]() | MoveToContent | Checks whether the current node is a content (non-white space text, CDATA, Element, EndElement, EntityReference, or EndEntity) node. If the node is not a content node, the reader skips ahead to the next content node or end of file. It skips over nodes of the following type: ProcessingInstruction, DocumentType, Comment, Whitespace, or SignificantWhitespace. (Inherited from XmlReader.) |
![]() ![]() | MoveToElement | Moves to the element that contains the current attribute node. (Overrides XmlReader::MoveToElement().) |
![]() ![]() | MoveToFirstAttribute | Moves to the first attribute. (Overrides XmlReader::MoveToFirstAttribute().) |
![]() ![]() | MoveToNextAttribute | Moves to the next attribute. (Overrides XmlReader::MoveToNextAttribute().) |
![]() ![]() | Read | Reads the next node from the stream. (Overrides XmlReader::Read().) |
![]() ![]() | ReadAttributeValue | Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes. (Overrides XmlReader::ReadAttributeValue().) |
![]() ![]() | ReadContentAs | Reads the content as an object of the type specified. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsBase64 | Reads the content and returns the Base64 decoded binary bytes. (Overrides XmlReader::ReadContentAsBase64(array<Byte>, Int32, Int32).) |
![]() ![]() | ReadContentAsBinHex | Reads the content and returns the BinHex decoded binary bytes. (Overrides XmlReader::ReadContentAsBinHex(array<Byte>, Int32, Int32).) |
![]() ![]() | ReadContentAsBoolean | Reads the text content at the current position as a Boolean. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsDateTime | Reads the text content at the current position as a DateTime object. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsDecimal | Reads the text content at the current position as a Decimal object. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsDouble | Reads the text content at the current position as a double-precision floating-point number. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsFloat | Reads the text content at the current position as a single-precision floating point number. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsInt | Reads the text content at the current position as a 32-bit signed integer. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsLong | Reads the text content at the current position as a 64-bit signed integer. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsObject | Reads the text content at the current position as an Object. (Inherited from XmlReader.) |
![]() ![]() | ReadContentAsString | Reads the text content at the current position as a String object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAs(Type, IXmlNamespaceResolver) | Reads the element content as the requested type. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAs(Type, IXmlNamespaceResolver, String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsBase64 | Reads the element and decodes the Base64 content. (Overrides XmlReader::ReadElementContentAsBase64(array<Byte>, Int32, Int32).) |
![]() ![]() | ReadElementContentAsBinHex | Reads the element and decodes the BinHex content. (Overrides XmlReader::ReadElementContentAsBinHex(array<Byte>, Int32, Int32).) |
![]() ![]() | ReadElementContentAsBoolean() | Reads the current element and returns the contents as a Boolean object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsBoolean(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Boolean object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsDateTime() | Reads the current element and returns the contents as a DateTime object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsDateTime(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a DateTime object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsDecimal() | Reads the current element and returns the contents as a Decimal object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsDecimal(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Decimal object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsDouble() | Reads the current element and returns the contents as a double-precision floating-point number. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsDouble(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a double-precision floating-point number. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsFloat() | Reads the current element and returns the contents as single-precision floating-point number. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsFloat(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a single-precision floating-point number. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsInt() | Reads the current element and returns the contents as a 32-bit signed integer. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsInt(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 32-bit signed integer. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsLong() | Reads the current element and returns the contents as a 64-bit signed integer. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsLong(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 64-bit signed integer. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsObject() | Reads the current element and returns the contents as an Object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsObject(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as an Object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsString() | Reads the current element and returns the contents as a String object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementContentAsString(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a String object. (Inherited from XmlReader.) |
![]() ![]() | ReadElementString() | Reads a text-only element. (Inherited from XmlReader.) |
![]() ![]() | ReadElementString(String) | Checks that the Name property of the element found matches the given string before reading a text-only element. (Inherited from XmlReader.) |
![]() ![]() | ReadElementString(String, String) | Checks that the LocalName and NamespaceURI properties of the element found matches the given strings before reading a text-only element. (Inherited from XmlReader.) |
![]() ![]() | ReadEndElement | Checks that the current content node is an end tag and advances the reader to the next node. (Inherited from XmlReader.) |
![]() ![]() | ReadInnerXml | When overridden in a derived class, reads all the content, including markup, as a string. (Inherited from XmlReader.) |
![]() ![]() | ReadOuterXml | When overridden in a derived class, reads the content, including markup, representing this node and all its children. (Inherited from XmlReader.) |
![]() ![]() | ReadStartElement() | Checks that the current node is an element and advances the reader to the next node. (Inherited from XmlReader.) |
![]() ![]() | ReadStartElement(String) | Checks that the current content node is an element with the given Name and advances the reader to the next node. (Inherited from XmlReader.) |
![]() ![]() | ReadStartElement(String, String) | Checks that the current content node is an element with the given LocalName and NamespaceURI and advances the reader to the next node. (Inherited from XmlReader.) |
![]() ![]() | ReadString | Reads the contents of an element or text node as a string. (Overrides XmlReader::ReadString().) |
![]() ![]() | ReadSubtree | Returns a new XmlReader instance that can be used to read the current node, and all its descendants. (Inherited from XmlReader.) |
![]() ![]() | ReadToDescendant(String) | Advances the XmlReader to the next descendant element with the specified qualified name. (Inherited from XmlReader.) |
![]() ![]() | ReadToDescendant(String, String) | Advances the XmlReader to the next descendant element with the specified local name and namespace URI. (Inherited from XmlReader.) |
![]() ![]() | ReadToFollowing(String) | Reads until an element with the specified qualified name is found. (Inherited from XmlReader.) |
![]() ![]() | ReadToFollowing(String, String) | Reads until an element with the specified local name and namespace URI is found. (Inherited from XmlReader.) |
![]() ![]() | ReadToNextSibling(String) | Advances the XmlReader to the next sibling element with the specified qualified name. (Inherited from XmlReader.) |
![]() ![]() | ReadToNextSibling(String, String) | Advances the XmlReader to the next sibling element with the specified local name and namespace URI. (Inherited from XmlReader.) |
![]() ![]() | ReadValueChunk | Reads large streams of text embedded in an XML document. (Inherited from XmlReader.) |
![]() ![]() | ResolveEntity | Resolves the entity reference for EntityReference nodes. (Overrides XmlReader::ResolveEntity().) |
![]() ![]() | Skip | Skips the children of the current node. (Overrides XmlReader::Skip().) |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | IDisposable::Dispose | For a description of this member, see IDisposable::Dispose. (Inherited from XmlReader.) |
![]() ![]() ![]() | IXmlNamespaceResolver::GetNamespacesInScope | Infrastructure. For a description of this member, see GetNamespacesInScope. |
![]() ![]() ![]() | IXmlNamespaceResolver::LookupNamespace | Infrastructure. For a description of this member, see LookupNamespace. |
![]() ![]() ![]() | IXmlNamespaceResolver::LookupPrefix | Infrastructure. For a description of this member, see IXmlNamespaceResolver::LookupPrefix. |
Note |
|---|
In the .NET Framework version 2.0, the recommended practice is to create XmlReader instances using the XmlReaderSettings class and the Create method. This allows you to take full advantage of all the new features introduced in the .NET Framework. For more information, see Creating XML Readers. |
The XmlNodeReader has the ability to read an XML DOM subtree. This class does not support document type definition (DTD) or schema validation. To perform data validation, use a validating XmlReader object.
For further discussion on the XmlReader classes, see Reading XML with the XmlReader.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
