Expand Minimize

XmlReader Methods

The XmlReader type exposes the following members.

  Name Description
Public method Close When overridden in a derived class, changes the ReadState to Closed.
Public method Static member Create(Stream) Creates a new XmlReader instance using the specified stream with default settings.
Public method Static member Create(String) Creates a new XmlReader instance with specified URI.
Public method Static member Create(TextReader) Creates a new XmlReader instance by using the specified text reader.
Public method Static member Create(Stream, XmlReaderSettings) Creates a new XmlReader instance with the specified stream and settings.
Public method Static member Create(String, XmlReaderSettings) Creates a new XmlReader instance by using the specified URI and settings.
Public method Static member Create(TextReader, XmlReaderSettings) Creates a new XmlReader instance by using the specified text reader and settings.
Public method Static member Create(XmlReader, XmlReaderSettings) Creates a new XmlReader instance by using the specified XML reader and settings.
Public method Static member Create(Stream, XmlReaderSettings, String) Creates a new XmlReader instance using the specified stream, base URI, and settings.
Public method Static member Create(Stream, XmlReaderSettings, XmlParserContext) Creates a new XmlReader instance using the specified stream, settings, and context information for parsing.
Public method Static member Create(String, XmlReaderSettings, XmlParserContext) Creates a new XmlReader instance by using the specified URI, settings, and context information for parsing.
Public method Static member Create(TextReader, XmlReaderSettings, String) Creates a new XmlReader instance by using the specified text reader, settings, and base URI.
Public method Static member Create(TextReader, XmlReaderSettings, XmlParserContext) Creates a new XmlReader instance by using the specified text reader, settings, and context information for parsing.
Public method Dispose() Releases all resources used by the current instance of the XmlReader class.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAttribute(Int32) When overridden in a derived class, gets the value of the attribute with the specified index.
Public method GetAttribute(String) When overridden in a derived class, gets the value of the attribute with the specified Name.
Public method GetAttribute(String, String) When overridden in a derived class, gets the value of the attribute with the specified LocalName and NamespaceURI.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValueAsync Asynchronously gets the value of the current node.
Public method Static member IsName Returns a value indicating whether the string argument is a valid XML name.
Public method Static member IsNameToken Returns a value indicating whether or not the string argument is a valid XML name token.
Public method IsStartElement() Calls MoveToContent and tests if the current content node is a start tag or empty element tag.
Public method 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.
Public method 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.
Public method LookupNamespace When overridden in a derived class, resolves a namespace prefix in the current element's scope.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method MoveToAttribute(Int32) When overridden in a derived class, moves to the attribute with the specified index.
Public method MoveToAttribute(String) When overridden in a derived class, moves to the attribute with the specified Name.
Public method MoveToAttribute(String, String) When overridden in a derived class, moves to the attribute with the specified LocalName and NamespaceURI.
Public method 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.
Public method MoveToContentAsync 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.
Public method MoveToElement When overridden in a derived class, moves to the element that contains the current attribute node.
Public method MoveToFirstAttribute When overridden in a derived class, moves to the first attribute.
Public method MoveToNextAttribute When overridden in a derived class, moves to the next attribute.
Public method Read When overridden in a derived class, reads the next node from the stream.
Public method ReadAsync Asynchronously reads the next node from the stream.
Public method ReadAttributeValue When overridden in a derived class, parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.
Public method ReadContentAs Reads the content as an object of the type specified.
Public method ReadContentAsAsync Asynchronously reads the content as an object of the type specified.
Public method ReadContentAsBase64 Reads the content and returns the Base64 decoded binary bytes.
Public method ReadContentAsBase64Async Asynchronously reads the content and returns the Base64 decoded binary bytes.
Public method ReadContentAsBinHex Reads the content and returns the BinHex decoded binary bytes.
Public method ReadContentAsBinHexAsync Asynchronously reads the content and returns the BinHex decoded binary bytes.
Public method ReadContentAsBoolean Reads the text content at the current position as a Boolean.
Public method ReadContentAsDateTime Reads the text content at the current position as a DateTime object.
Public method ReadContentAsDateTimeOffset Reads the text content at the current position as a DateTimeOffset object.
Public method ReadContentAsDecimal Reads the text content at the current position as a Decimal object.
Public method ReadContentAsDouble Reads the text content at the current position as a double-precision floating-point number.
Public method ReadContentAsFloat Reads the text content at the current position as a single-precision floating point number.
Public method ReadContentAsInt Reads the text content at the current position as a 32-bit signed integer.
Public method ReadContentAsLong Reads the text content at the current position as a 64-bit signed integer.
Public method ReadContentAsObject Reads the text content at the current position as an Object.
Public method ReadContentAsObjectAsync Asynchronously reads the text content at the current position as an Object.
Public method ReadContentAsString Reads the text content at the current position as a String object.
Public method ReadContentAsStringAsync Asynchronously reads the text content at the current position as a String object.
Public method ReadElementContentAs(Type, IXmlNamespaceResolver) Reads the element content as the requested type.
Public method 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.
Public method ReadElementContentAsAsync Asynchronously reads the element content as the requested type.
Public method ReadElementContentAsBase64 Reads the element and decodes the Base64 content.
Public method ReadElementContentAsBase64Async Asynchronously reads the element and decodes the Base64 content.
Public method ReadElementContentAsBinHex Reads the element and decodes the BinHex content.
Public method ReadElementContentAsBinHexAsync Asynchronously reads the element and decodes the BinHex content.
Public method ReadElementContentAsBoolean() Reads the current element and returns the contents as a Boolean object.
Public method 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.
Public method ReadElementContentAsDateTime() Reads the current element and returns the contents as a DateTime object.
Public method 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.
Public method ReadElementContentAsDecimal() Reads the current element and returns the contents as a Decimal object.
Public method 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.
Public method ReadElementContentAsDouble() Reads the current element and returns the contents as a double-precision floating-point number.
Public method 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.
Public method ReadElementContentAsFloat() Reads the current element and returns the contents as single-precision floating-point number.
Public method 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.
Public method ReadElementContentAsInt() Reads the current element and returns the contents as a 32-bit signed integer.
Public method 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.
Public method ReadElementContentAsLong() Reads the current element and returns the contents as a 64-bit signed integer.
Public method 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.
Public method ReadElementContentAsObject() Reads the current element and returns the contents as an Object.
Public method 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.
Public method ReadElementContentAsObjectAsync Asynchronously reads the current element and returns the contents as an Object.
Public method ReadElementContentAsString() Reads the current element and returns the contents as a String object.
Public method 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.
Public method ReadElementContentAsStringAsync Asynchronously reads the current element and returns the contents as a String object.
Public method ReadElementString() Reads a text-only element. However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation.
Public method ReadElementString(String) Checks that the Name property of the element found matches the given string before reading a text-only element. However, we recommend that you use the ReadElementContentAsString() method instead, because it provides a more straightforward way to handle this operation.
Public method ReadElementString(String, String) Checks that the LocalName and NamespaceURI properties of the element found matches the given strings before reading a text-only element. However, we recommend that you use the ReadElementContentAsString(String, String) method instead, because it provides a more straightforward way to handle this operation.
Public method ReadEndElement Checks that the current content node is an end tag and advances the reader to the next node.
Public method ReadInnerXml When overridden in a derived class, reads all the content, including markup, as a string.
Public method ReadInnerXmlAsync Asynchronously reads all the content, including markup, as a string.
Public method ReadOuterXml When overridden in a derived class, reads the content, including markup, representing this node and all its children.
Public method ReadOuterXmlAsync Asynchronously reads the content, including markup, representing this node and all its children.
Public method ReadStartElement() Checks that the current node is an element and advances the reader to the next node.
Public method ReadStartElement(String) Checks that the current content node is an element with the given Name and advances the reader to the next node.
Public method 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.
Public method ReadString When overridden in a derived class, reads the contents of an element or text node as a string. However, we recommend that you use the ReadElementContentAsString method instead, because it provides a more straightforward way to handle this operation.
Public method ReadSubtree Returns a new XmlReader instance that can be used to read the current node, and all its descendants.
Public method ReadToDescendant(String) Advances the XmlReader to the next descendant element with the specified qualified name.
Public method ReadToDescendant(String, String) Advances the XmlReader to the next descendant element with the specified local name and namespace URI.
Public method ReadToFollowing(String) Reads until an element with the specified qualified name is found.
Public method ReadToFollowing(String, String) Reads until an element with the specified local name and namespace URI is found.
Public method ReadToNextSibling(String) Advances the XmlReader to the next sibling element with the specified qualified name.
Public method ReadToNextSibling(String, String) Advances the XmlReader to the next sibling element with the specified local name and namespace URI.
Public method ReadValueChunk Reads large streams of text embedded in an XML document.
Public method ReadValueChunkAsync Asynchronously reads large streams of text embedded in an XML document.
Public method ResolveEntity When overridden in a derived class, resolves the entity reference for EntityReference nodes.
Public method Skip Skips the children of the current node.
Public method SkipAsync Asynchronously skips the children of the current node.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

  Name Description
Explicit interface implemetation Private method IDisposable.Dispose For a description of this member, see IDisposable.Dispose.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft