System.Xml.XmlReader Members

The members of System.Xml.XmlReader are listed below.

See Also: Inherited members from System.Object

Protected Constructors

Initializes a new instance of the XmlReader class.

Public Properties

[read-only]
abstract
AttributeCountint.

When overridden in a derived class, gets the number of attributes on the current node.

[read-only]
abstract
BaseURIstring.

When overridden in a derived class, gets the base URI of the current node.

[read-only]
CanReadBinaryContentbool.

Gets a value indicating whether the System.Xml.XmlReader implements the binary content read methods.

[read-only]
CanReadValueChunkbool.

Gets a value indicating whether the System.Xml.XmlReader implements the XmlReader.ReadValueChunk(Char[], int, int) method.

[read-only]
CanResolveEntitybool.

Gets a value indicating whether this reader can parse and resolve entities.

[read-only]
abstract
Depthint.

When overridden in a derived class, gets the depth of the current node in the XML document.

[read-only]
abstract
EOFbool.

When overridden in a derived class, gets a value indicating whether the reader is positioned at the end of the stream.

[read-only]
HasAttributesbool.

Gets a value indicating whether the current node has any attributes.

[read-only]
HasValuebool.

When overridden in a derived class, gets a value indicating whether the current node can have a XmlReader.Value.

[read-only]
IsDefaultbool.

When overridden in a derived class, gets a value indicating whether the current node is an attribute that was generated from the default value defined in the DTD or schema.

[read-only]
abstract
IsEmptyElementbool.

When overridden in a derived class, gets a value indicating whether the current node is an empty element (for example, <MyElement/>).

[read-only]
default property
Item(int)string. Retrieves the value of the attribute with the specified index relative to the containing element.
[read-only]
default property
Item(string)string. Retrieves the value of the attribute with the specified qualified name.
[read-only]
default property
Item(string, string)string. Retrieves the value of the attribute with the specified local name and namespace URI.
[read-only]
abstract
LocalNamestring.

When overridden in a derived class, gets the local name of the current node.

[read-only]
Namestring.

When overridden in a derived class, gets the qualified name of the current node.

[read-only]
abstract
NamespaceURIstring.

When overridden in a derived class, gets the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned.

[read-only]
abstract
NameTableXmlNameTable.

When overridden in a derived class, gets the System.Xml.XmlNameTable associated with this implementation.

[read-only]
abstract
NodeTypeXmlNodeType.

When overridden in a derived class, gets the type of the current node.

[read-only]
abstract
Prefixstring.

When overridden in a derived class, gets the namespace prefix associated with the current node.

[read-only]
QuoteCharchar.

When overridden in a derived class, gets the quotation mark character used to enclose the value of an attribute node.

[read-only]
abstract
ReadStateReadState.

When overridden in a derived class, gets the state of the reader.

[read-only]
SchemaInfoSystem.Xml.Schema.IXmlSchemaInfo.

Gets the schema information that has been assigned to the current node as a result of schema validation.

[read-only]
SettingsXmlReaderSettings.

Gets the System.Xml.XmlReaderSettings object used to create this System.Xml.XmlReader instance.

[read-only]
abstract
Valuestring.

When overridden in a derived class, gets the text value of the current node.

[read-only]
ValueTypeType.

Gets The Common Language Runtime (CLR) type for the current node.

[read-only]
XmlLangstring.

When overridden in a derived class, gets the current xml:lang scope.

[read-only]
XmlSpaceXmlSpace.

When overridden in a derived class, gets the current xml:space scope.

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.

Explicitly Implemented Interface Members

IDisposable.Dispose

For a description of this member, see IDisposable.Dispose.