The methods of the XmlTextReader class are listed below. For a complete list of XmlTextReader class members, see the XmlTextReader Members topic.
Close | Closes the stream, changes the ReadState to Closed, and sets all the properties back to zero. |
CopySettings | Copies all settings from the specified XmlTextReader, including the EntityHandling, Namespaces, Normalization, DecodeNames, WhitespaceHandling, Validation and Filter properties. |
Equals (inherited from Object) | Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
GetAttribute | Overloaded. Gets the value of an attribute. |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetType (inherited from Object) | Gets the Type of the Object. |
LookupNamespace | Resolves a namespace prefix in the current element's scope. |
MoveToAttribute | Overloaded. Move to the specified attribute.
The MoveToAttribute methods enable you to get both random access to attributes and strongly typed access to attribute values. To get strongly typed access to an attribute value, you must do the following:
After calling MoveToAttribute, the Name, Namespace, Prefix properties will reflect the properties of that attribute. |
MoveToElement | Moves to the element that contains the current attribute node. |
MoveToFirstAttribute | Moves to the first attribute. |
MoveToNextAttribute | Moves to the next attribute. |
Read | Reads the next node from the stream. |
ReadAttributeValue | Parses the attribute value into one or more Text and/or EntityReference node types. |
ReadBoolean (inherited from XmlReader) | Reads the value and returns it as a bool. |
ReadChar | Reads the element content one character at a time. |
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. |
ReadCurrency (inherited from XmlReader) | Reads the value and returns it as a Currency. |
ReadDate (inherited from XmlReader) | Reads the value and returns it as a DateTime. |
ReadDecimal (inherited from XmlReader) | Reads the value and returns it as a Decimal. |
ReadDouble (inherited from XmlReader) | Reads the value and returns it as a double. |
ReadInnerXml | Reads all the content (including markup) as a string. |
ReadInt16 (inherited from XmlReader) | Reads the value and returns it as an Int16. |
ReadInt32 (inherited from XmlReader) | Reads the value and returns it as an Int32. |
ReadInt64 (inherited from XmlReader) | Reads the value and returns it as an Int64. |
ReadSingle (inherited from XmlReader) | Reads the value and returns it as a float. |
ReadString | Reads the contents of an element as a string. |
ReadTimeSpan (inherited from XmlReader) | Reads the value and returns it as a TimeSpan. |
ResolveEntity | Overloaded. Resolves an entity reference. |
Skip | Skips to the end tag of the current element. |
TagNameIs (inherited from XmlReader) | Overloaded. Checks whether the current element has the specified name. |
ToString (inherited from Object) | Returns a String that represents the current Object. |
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object. |