Share via


XmlReader Members

The following tables list the members exposed by the XmlReader type.

Public Constructors

Name Description
Public Method XmlReader Initializes a new instance of the XmlReader class.

Public Properties

Name Description
Public Property AttributeCount Gets the number of attributes on the current node.
Public Property BaseURI Gets the base URI of the current node.
Public Property CanReadBinaryContent Gets binary content from specified methods.
Public Property CanReadValueChunk Gets information about calls to ReadValueChunk.
Public Property CanResolveEntity Gets a value indicating whether this XmlReader can parse and resolve entities.
Public Property Depth Gets the depth of the current node in the XML element stack.
Public Property EOF Gets the XmlReader position in a stream.
Public Property HasAttributes Gets a value indicating whether the current node has any attributes.
Public Property HasValue Gets a value indicating whether the current node has value.
Public Property IsDefault Gets a value indicating whether the current node is an attribute that was generated from the default value defined in the DTD or schema.
Public Property IsEmptyElement Gets a value indicating whether the current node is an empty element.
Public Property Item Overloaded. Gets the value of an attribute.
Public Property LocalName Gets the name of the current node without the namespace prefix.
Public Property Name Gets the name of the current node, including the namespace prefix.
Public Property NamespaceURI Gets the namespace Uniform Resource Name (URN), as defined in the W3C Namespace Specification, of the current namespace scope.
Public Property NameTable Gets the XmlNameTable associated with the XmlReader.
Public Property NodeType Gets the type of the current node.
Public Property Prefix Gets the namespace prefix associated with the current node.
Public Property QuoteChar Gets the quotation mark character used to enclose the value of an attribute node.
Public Property ReadState Gets the ReadState of the XmlReader.
Public Property Settings Gets the XmlReaderSettings object used to create this XmlReader instance.
Public Property Value When overridden in a derived class, gets the text value of the current node.
Public Property ValueType Gets the Common Language Runtime (CLR) type for the current node.
Public Property XmlLang Gets the current xml:lang scope.
Public Property XmlSpace Gets the current xml:space scope.

Public Methods

Name Description
Public Method Close Closes the stream, changes the ReadState to Closed, and sets all properties back to zero/empty string.
Public Method Static Create Overloaded. Creates a new XmlReader instance.
Public Method Dispose Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources.
Public Method Equals (Inherited from Object.)
Public Method GetAttribute Overloaded. Gets the value of an attribute.
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Static IsName Gets a value indicating whether the string argument is a valid XML name.
Public Method Static IsNameToken Gets a value indicating whether or not the string argument is a valid XML name token.
Public Method IsStartElement Overloaded. Tests the current content node to determine whether it is a start tag or empty tag; also tests property and string matches.
Public Method LookupNamespace Resolves a namespace prefix in the current element's scope.
Public Method MoveToAttribute Overloaded. Moves to the specified attribute.
Public Method MoveToContent Checks to find whether the current node is a content node.
Public Method MoveToElement Moves to the element that contains the current attribute node.
Public Method MoveToFirstAttribute Moves to the first attribute of the current node.
Public Method MoveToNextAttribute Moves to the next attribute.
Public Method Read Moves through the Stream and reads the next node from the stream.
Public Method ReadAttributeValue Parses the attribute value into one or more Text and/or EntityReference node types.
Public Method ReadContentAsBase64 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 ReadContentAsObject Reads the text content at the current position as an Object.
Public Method ReadElementContentAsBase64 Reads the element and decodes the Base64 content.
Public Method ReadElementContentAsBinHex Reads the element and decodes the BinHex content.
Public Method ReadElementString Overloaded. This is a helper method for reading simple text-only elements.
Public Method ReadEndElement Checks to find that the current content node is an end tag and advances the reader to the next node.
Public Method ReadStartElement Overloaded. Checks to find whether the current node is an element and advances the reader to the next node.
Public Method ReadString Reads the contents of an element or text node as a string.
Public Method ReadToDescendant Overloaded. Advances the XmlReader to the next matching descendant element.
Public Method ReadToFollowing Overloaded. Reads until the named element is found.
Public Method ReadToNextSibling Overloaded. Advances the xmlReader to the next matching sibling element.
Public Method ReadValueChunk Reads large streams of text embedded in an XML document.
Public Method ReferenceEquals (Inherited from Object.)
Public Method ResolveEntity Resolves the entity reference for EntityReference nodes.
Public Method Skip Skips to the end tag of the current element.
Public Method ToString (Inherited from Object.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Reference

XmlReader Class
System.Xml Namespace