XmlTextReader Members
Represents a reader that provides fast, non-cached, forward-only access to XML data.
The following tables list the members exposed by the XmlTextReader type.
Public Constructors
(see also
Protected Constructors
)
| Name | Description | |
|---|---|---|
| XmlTextReader | Overloaded. Initializes a new instance of the XmlTextReader. |
Protected Constructors
| Name | Description | |
|---|---|---|
| XmlTextReader | Overloaded. Initializes a new instance of the XmlTextReader. |
Public Properties
| Name | Description | |
|---|---|---|
| AttributeCount | Overridden. Gets the number of attributes on the current node. |
| BaseURI | Overridden. Gets the base URI of the current node. |
| CanReadBinaryContent | Overridden. Gets a value indicating whether the XmlTextReader implements the binary content read methods. |
| CanReadValueChunk | Overridden. Gets a value indicating whether the XmlTextReader implements the ReadValueChunk method. |
| CanResolveEntity | Overridden. Gets a value indicating whether this reader can parse and resolve entities. |
| Depth | Overridden. Gets the depth of the current node in the XML document. |
| Encoding | Gets the encoding of the document. |
| EntityHandling | Gets or sets a value that specifies how the reader handles entities. |
| EOF | Overridden. Gets a value indicating whether the reader is positioned at the end of the stream. |
| HasAttributes | Gets a value indicating whether the current node has any attributes.(inherited from XmlReader) |
| HasValue | Overridden. Gets a value indicating whether the current node can have a Value other than String.Empty. |
| IsDefault | Overridden. Gets a value indicating whether the current node is an attribute that was generated from the default value defined in the DTD or schema. |
| IsEmptyElement | Overridden. Gets a value indicating whether the current node is an empty element (for example, <MyElement/>). |
| Item | Overloaded. When overridden in a derived class, gets the value of the attribute.(inherited from XmlReader) |
| LineNumber | Gets the current line number. |
| LinePosition | Gets the current line position. |
| LocalName | Overridden. Gets the local name of the current node. |
| Name | Overridden. Gets the qualified name of the current node. |
| Namespaces | Gets or sets a value indicating whether to do namespace support. |
| NamespaceURI | Overridden. Gets the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned. |
| NameTable | Overridden. Gets the XmlNameTable associated with this implementation. |
| NodeType | Overridden. Gets the type of the current node. |
| Normalization | Gets or sets a value indicating whether to normalize white space and attribute values. |
| Prefix | Overridden. Gets the namespace prefix associated with the current node. |
| ProhibitDtd | Gets or sets a value indicating whether to allow DTD processing. |
| QuoteChar | Overridden. Gets the quotation mark character used to enclose the value of an attribute node. |
| ReadState | Overridden. Gets the state of the reader. |
| SchemaInfo | Gets the schema information that has been assigned to the current node as a result of schema validation.(inherited from XmlReader) |
| Settings | Overridden. Gets the XmlReaderSettings object used to create this XmlTextReader instance. |
| Value | Overridden. Gets the text value of the current node. |
| ValueType | Gets The Common Language Runtime (CLR) type for the current node.(inherited from XmlReader) |
| WhitespaceHandling | Gets or sets a value that specifies how white space is handled. |
| XmlLang | Overridden. Gets the current xml:lang scope. |
| XmlResolver | Sets the XmlResolver used for resolving DTD references. |
| XmlSpace | Overridden. Gets the current xml:space scope. |
Public Methods
(see also
Protected Methods
)
| Name | Description | |
|---|---|---|
| Close | Overridden. Changes the ReadState to Closed. |
| Create | Overloaded. Creates a new XmlReader instance. (inherited from XmlReader) |
| Equals | Overloaded. Determines whether two Object instances are equal. (inherited from Object) |
| GetAttribute | Overloaded. Overridden. Gets the value of an attribute. |
| GetHashCode | Serves as a hash function for a particular type. (inherited from Object) |
| GetNamespacesInScope | Gets a collection that contains all namespaces currently in-scope. |
| GetRemainder | Gets the remainder of the buffered XML. |
| GetType | Gets the Type of the current instance. (inherited from Object) |
| HasLineInfo | Gets a value indicating whether the class can return line information. |
| IsName | Gets a value indicating whether the string argument is a valid XML name. (inherited from XmlReader) |
| IsNameToken | Gets a value indicating whether or not the string argument is a valid XML name token. (inherited from XmlReader) |
| IsStartElement | Overloaded. Tests if the current content node is a start tag. (inherited from XmlReader) |
| LookupNamespace | Overridden. Resolves a namespace prefix in the current element's scope. |
| MoveToAttribute | Overloaded. Overridden. Moves to the specified attribute. |
| 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 | Overridden. Moves to the element that contains the current attribute node. |
| MoveToFirstAttribute | Overridden. Moves to the first attribute. |
| MoveToNextAttribute | Overridden. Moves to the next attribute. |
| Read | Overridden. Reads the next node from the stream. |
| ReadAttributeValue | Overridden. Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes. |
| ReadBase64 | Decodes Base64 and returns the decoded binary bytes. |
| ReadBinHex | Decodes BinHex and returns the decoded binary bytes. |
| ReadChars | Reads the text contents of an element into a character buffer. This method is designed to read large streams of embedded text by calling it successively. |
| ReadContentAs | Reads the content as an object of the type specified. (inherited from XmlReader) |
| ReadContentAsBase64 | Overridden. Reads the content and returns the Base64 decoded binary bytes. |
| ReadContentAsBinHex | Overridden. Reads the content and returns the BinHex decoded binary bytes. |
| 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 | Overloaded. Reads the current element and returns the contents as an object of the type specified. (inherited from XmlReader) |
| ReadElementContentAsBase64 | Overridden. Reads the element and decodes the Base64 content. |
| ReadElementContentAsBinHex | Overridden. Reads the element and decodes the BinHex content. |
| ReadElementContentAsBoolean | Overloaded. Reads the current element value as a Boolean object. (inherited from XmlReader) |
| ReadElementContentAsDateTime | Overloaded. Reads the current element and returns the contents as a DateTime object. (inherited from XmlReader) |
| ReadElementContentAsDecimal | Overloaded. Reads the current element value as a Decimal object. (inherited from XmlReader) |
| ReadElementContentAsDouble | Overloaded. Reads the current element and returns the contents as a double-precision floating-point number. (inherited from XmlReader) |
| ReadElementContentAsFloat | Overloaded. Reads the current element value as a single-precision floating-point number. (inherited from XmlReader) |
| ReadElementContentAsInt | Overloaded. Reads the current element and returns the contents as a 32-bit signed integer. (inherited from XmlReader) |
| ReadElementContentAsLong | Overloaded. Reads the current element and returns the contents as a 64-bit signed integer. (inherited from XmlReader) |
| ReadElementContentAsObject | Overloaded. Reads the current element and returns the contents as an Object. (inherited from XmlReader) |
| ReadElementContentAsString | Overloaded. Reads the current element and returns the contents as a String object. (inherited from XmlReader) |
| ReadElementString | Overloaded. This is a helper method for reading simple text-only elements. (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 | Overloaded. Checks that the current node is an element and advances the reader to the next node. (inherited from XmlReader) |
| ReadString | Overridden. Reads the contents of an element or a text node as a string. |
| ReadSubtree | Returns a new XmlReader instance that can be used to read the current node, and all its descendants. (inherited from XmlReader) |
| ReadToDescendant | Overloaded. Advances the XmlReader to the next matching descendant element. (inherited from XmlReader) |
| ReadToFollowing | Overloaded. Reads until the named element is found. (inherited from XmlReader) |
| ReadToNextSibling | Overloaded. Advances the XmlReader to the next matching sibling element. (inherited from XmlReader) |
| ReadValueChunk | Reads large streams of text embedded in an XML document. (inherited from XmlReader) |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (inherited from Object) |
| ResetState | Resets the state of the reader to ReadState.Initial. |
| ResolveEntity | Overridden. Resolves the entity reference for EntityReference nodes. |
| Skip | Overridden. Skips the children of the current node. |
| ToString | Returns a String that represents the current Object. (inherited from Object) |
Protected Methods
| Name | Description | |
|---|---|---|
| Dispose | Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources. (inherited from XmlReader) |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object) |
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| System.Xml.IXmlLineInfo.HasLineInfo | For a description of this member, see IXmlLineInfo.HasLineInfo. |
| System.Xml.IXmlNamespaceResolver.GetNamespacesInScope | |
| System.Xml.IXmlNamespaceResolver.LookupNamespace | |
| System.Xml.IXmlNamespaceResolver.LookupPrefix |
See Also
Reference
XmlTextReader ClassSystem.Xml Namespace
Other Resources
XML Documents and DataSecurity and Your System.Xml Applications