The methods of the XmlReader class are listed below. For a complete list of XmlReader class members, see the XmlReader Members topic.
Close | Closes the stream, changes the ReadState to Closed, and sets all the properties back to zero. |
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. Moves 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 | 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 | Reads the value and returns it as a Currency. |
ReadDate | Reads the value and returns it as a DateTime. |
ReadDecimal | Reads the value and returns it as a Decimal. |
ReadDouble | Reads the value and returns it as a double. |
ReadInnerXml | Reads all the content (including markup) as a string. |
ReadInt16 | Reads the value and returns it as an Int16. |
ReadInt32 | Reads the value and returns it as an Int32. |
ReadInt64 | Reads the value and returns it as an Int64. |
ReadSingle | Reads the value and returns it as a float. |
ReadString | Reads the contents of an element as a string. |
ReadTimeSpan | 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 | 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. |