System.Xml.XmlReader: Method Members

The methods of System.Xml.XmlReader are listed below. For a list of all members, see the XmlReader Members list.

See Also: Inherited members from System.Object

Public Methods

Close()

When overridden in a derived class, changes the XmlReader.ReadState to Closed.

static
Create(System.IO.Stream) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified stream.

static
Create(System.IO.TextReader) : XmlReader

Creates a new System.Xml.XmlReader instance with the specified System.IO.TextReader.

static
Create(string) : XmlReader

Creates a new System.Xml.XmlReader instance with specified URI.

static
Create(System.IO.Stream, XmlReaderSettings) : XmlReader

Creates a new System.Xml.XmlReader instance with the specified stream and System.Xml.XmlReaderSettings object.

static
Create(System.IO.TextReader, XmlReaderSettings) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified System.IO.TextReader and System.Xml.XmlReaderSettings objects.

static
Create(string, XmlReaderSettings) : XmlReader

Creates a new instance with the specified URI and System.Xml.XmlReaderSettings.

static
Create(XmlReader, XmlReaderSettings) : XmlReader

Creates a new System.Xml.XmlReader instance with the specified System.Xml.XmlReader and System.Xml.XmlReaderSettings objects.

static
Create(System.IO.Stream, XmlReaderSettings, string) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified stream, base URI, and System.Xml.XmlReaderSettings object.

static
Create(System.IO.Stream, XmlReaderSettings, XmlParserContext) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified stream, System.Xml.XmlReaderSettings, and System.Xml.XmlParserContext objects.

static
Create(System.IO.TextReader, XmlReaderSettings, string) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified System.IO.TextReader, System.Xml.XmlReaderSettings, and base URI.

static
Create(System.IO.TextReader, XmlReaderSettings, XmlParserContext) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified System.IO.TextReader, System.Xml.XmlReaderSettings, and System.Xml.XmlParserContext objects.

static
Create(string, XmlReaderSettings, XmlParserContext) : XmlReader

Creates a new System.Xml.XmlReader instance using the specified URI, System.Xml.XmlReaderSettings, and System.Xml.XmlParserContext objects.

Dispose()

Releases all resources used by the current instance of the System.Xml.XmlReader class.

abstract
GetAttribute(int) : string

When overridden in a derived class, gets the value of the attribute with the specified index.

abstract
GetAttribute(string) : string

When overridden in a derived class, gets the value of the attribute with the specified XmlReader.Name.

abstract
GetAttribute(string, string) : string

When overridden in a derived class, gets the value of the attribute with the specified XmlReader.LocalName and XmlReader.NamespaceURI.

GetValueAsync() : System.Threading.Tasks.Task<string>

Asynchronously gets the value of the current node.

static
IsName(string) : bool

Returns a value indicating whether the string argument is a valid XML name.

static
IsNameToken(string) : bool

Returns a value indicating whether or not the string argument is a valid XML name token.

IsStartElement() : bool

Calls XmlReader.MoveToContent and tests if the current content node is a start tag or empty element tag.

IsStartElement(string) : bool

Calls XmlReader.MoveToContent and tests if the current content node is a start tag or empty element tag and if the XmlReader.Name property of the element found matches the given argument.

IsStartElement(string, string) : bool

Calls XmlReader.MoveToContent and tests if the current content node is a start tag or empty element tag and if the XmlReader.LocalName and XmlReader.NamespaceURI properties of the element found match the given strings.

abstract
LookupNamespace(string) : string

When overridden in a derived class, resolves a namespace prefix in the current element's scope.

MoveToAttribute(int)

When overridden in a derived class, moves to the attribute with the specified index.

abstract
MoveToAttribute(string) : bool

When overridden in a derived class, moves to the attribute with the specified XmlReader.Name.

abstract
MoveToAttribute(string, string) : bool

When overridden in a derived class, moves to the attribute with the specified XmlReader.LocalName and XmlReader.NamespaceURI.

MoveToContent() : XmlNodeType

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.

MoveToContentAsync() : System.Threading.Tasks.Task<XmlNodeType>

Asynchronously checks whether the current node is a content node. If the node is not a content node, the reader skips ahead to the next content node or end of file.

abstract
MoveToElement() : bool

When overridden in a derived class, moves to the element that contains the current attribute node.

abstract
MoveToFirstAttribute() : bool

When overridden in a derived class, moves to the first attribute.

abstract
MoveToNextAttribute() : bool

When overridden in a derived class, moves to the next attribute.

abstract
Read() : bool

When overridden in a derived class, reads the next node from the stream.

ReadAsync() : System.Threading.Tasks.Task<bool>

Asynchronously reads the next node from the stream.

abstract
ReadAttributeValue() : bool

When overridden in a derived class, parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.

ReadContentAs(Type, IXmlNamespaceResolver) : object

Reads the content as an object of the type specified.

ReadContentAsAsync(Type, IXmlNamespaceResolver) : System.Threading.Tasks.Task<object>

Asynchronously reads the content as an object of the type specified.

ReadContentAsBase64(byte[], int, int) : int

Reads the content and returns the Base64 decoded binary bytes.

ReadContentAsBase64Async(byte[], int, int) : System.Threading.Tasks.Task<int>

Asynchronously reads the content and returns the Base64 decoded binary bytes.

ReadContentAsBinHex(byte[], int, int) : int

Reads the content and returns the BinHex decoded binary bytes.

ReadContentAsBinHexAsync(byte[], int, int) : System.Threading.Tasks.Task<int>

Asynchronously reads the content and returns the BinHex decoded binary bytes.

ReadContentAsBoolean() : bool

Reads the text content at the current position as a Boolean.

ReadContentAsDateTime() : DateTime

Reads the text content at the current position as a DateTime object.

ReadContentAsDateTimeOffset() : DateTimeOffset

Reads the text content at the current position as a DateTimeOffset object.

ReadContentAsDecimal() : decimal

Reads the text content at the current position as a decimal object.

ReadContentAsDouble() : double

Reads the text content at the current position as a double-precision floating-point number.

ReadContentAsFloat() : float

Reads the text content at the current position as a single-precision floating point number.

ReadContentAsInt() : int

Reads the text content at the current position as a 32-bit signed integer.

ReadContentAsLong() : long

Reads the text content at the current position as a 64-bit signed integer.

ReadContentAsObject() : object

Reads the text content at the current position as an object.

ReadContentAsObjectAsync() : System.Threading.Tasks.Task<object>

Asynchronously reads the text content at the current position as an object.

ReadContentAsString() : string

Reads the text content at the current position as a string object.

ReadContentAsStringAsync() : System.Threading.Tasks.Task<string>

Asynchronously reads the text content at the current position as a string object.

ReadElementContentAs(Type, IXmlNamespaceResolver) : object

Reads the element content as the requested type.

ReadElementContentAs(Type, IXmlNamespaceResolver, string, string) : object

Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type.

ReadElementContentAsAsync(Type, IXmlNamespaceResolver) : System.Threading.Tasks.Task<object>

Asynchronously reads the element content as the requested type.

ReadElementContentAsBase64(byte[], int, int) : int

Reads the element and decodes the Base64 content.

ReadElementContentAsBase64Async(byte[], int, int) : System.Threading.Tasks.Task<int>

Asynchronously reads the element and decodes the Base64 content.

ReadElementContentAsBinHex(byte[], int, int) : int

Reads the element and decodes the BinHex content.

ReadElementContentAsBinHexAsync(byte[], int, int) : System.Threading.Tasks.Task<int>

Asynchronously reads the element and decodes the BinHex content.

ReadElementContentAsBoolean() : bool

Reads the current element and returns the contents as a bool object.

ReadElementContentAsBoolean(string, string) : bool

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 bool object.

ReadElementContentAsDateTime() : DateTime

Reads the current element and returns the contents as a DateTime object.

ReadElementContentAsDateTime(string, string) : DateTime

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.

ReadElementContentAsDecimal() : decimal

Reads the current element and returns the contents as a decimal object.

ReadElementContentAsDecimal(string, string) : decimal

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.

ReadElementContentAsDouble() : double

Reads the current element and returns the contents as a double-precision floating-point number.

ReadElementContentAsDouble(string, string) : double

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.

ReadElementContentAsFloat() : float

Reads the current element and returns the contents as single-precision floating-point number.

ReadElementContentAsFloat(string, string) : float

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.

ReadElementContentAsInt() : int

Reads the current element and returns the contents as a 32-bit signed integer.

ReadElementContentAsInt(string, string) : int

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.

ReadElementContentAsLong() : long

Reads the current element and returns the contents as a 64-bit signed integer.

ReadElementContentAsLong(string, string) : long

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.

ReadElementContentAsObject() : object

Reads the current element and returns the contents as an object.

ReadElementContentAsObject(string, string) : object

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.

ReadElementContentAsObjectAsync() : System.Threading.Tasks.Task<object>

Asynchronously reads the current element and returns the contents as an object.

ReadElementContentAsString() : string

Reads the current element and returns the contents as a string object.

ReadElementContentAsString(string, 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.

ReadElementContentAsStringAsync() : System.Threading.Tasks.Task<string>

Asynchronously reads the current element and returns the contents as a string object.

ReadElementString() : string

Reads a text-only element.

ReadElementString(string) : string

Checks that the XmlReader.Name property of the element found matches the given string before reading a text-only element.

ReadElementString(string, string) : string

Checks that the XmlReader.LocalName and XmlReader.NamespaceURI properties of the element found matches the given strings before reading a text-only element.

ReadEndElement()

Checks that the current content node is an end tag and advances the reader to the next node.

ReadInnerXml() : string

When overridden in a derived class, reads all the content, including markup, as a string.

ReadInnerXmlAsync() : System.Threading.Tasks.Task<string>

Asynchronously reads all the content, including markup, as a string.

ReadOuterXml() : string

When overridden in a derived class, reads the content, including markup, representing this node and all its children.

ReadOuterXmlAsync() : System.Threading.Tasks.Task<string>

Asynchronously reads the content, including markup, representing this node and all its children.

ReadStartElement()

Checks that the current node is an element and advances the reader to the next node.

ReadStartElement(string)

Checks that the current content node is an element with the given XmlReader.Name and advances the reader to the next node.

ReadStartElement(string, string)

Checks that the current content node is an element with the given XmlReader.LocalName and XmlReader.NamespaceURI and advances the reader to the next node.

ReadString() : string

When overridden in a derived class, reads the contents of an element or text node as a string.

ReadSubtree() : XmlReader

Returns a new XmlReader instance that can be used to read the current node, and all its descendants.

ReadToDescendant(string) : bool

Advances the System.Xml.XmlReader to the next descendant element with the specified qualified name.

ReadToDescendant(string, string) : bool

Advances the System.Xml.XmlReader to the next descendant element with the specified local name and namespace URI.

ReadToFollowing(string) : bool

Reads until an element with the specified qualified name is found.

ReadToFollowing(string, string) : bool

Reads until an element with the specified local name and namespace URI is found.

ReadToNextSibling(string) : bool

Advances the XmlReader to the next sibling element with the specified qualified name.

ReadToNextSibling(string, string) : bool

Advances the XmlReader to the next sibling element with the specified local name and namespace URI.

ReadValueChunk(char[], int, int) : int

Reads large streams of text embedded in an XML document.

ReadValueChunkAsync(char[], int, int) : System.Threading.Tasks.Task<int>

Asynchronously reads large streams of text embedded in an XML document.

abstract
ResolveEntity()

When overridden in a derived class, resolves the entity reference for EntityReference nodes.

Skip()

Skips the children of the current node.

SkipAsync() : System.Threading.Tasks.Task

Asynchronously skips the children of the current node.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.Xml.XmlReader and optionally releases the managed resources.