Mono Class Library: System.Xml.XmlReader Overview | MembersSystem.Xml.XmlReader.ReadString Method |
Reads the contents of an element or text node as a string. [Edit]
|
A string containing the contents of the Element or Text node, or string.Empty if the reader is positioned on any other type of node. [Edit]
Type Reason System.Xml.XmlException An error occurred while parsing the XML. [Edit]
Operation
If positioned on an Element node, this method concatenates all Text, SignificantWhitespace, Whitespace, and CDATA node types, and returns the concatenated data as the element content. If none of these node types exist, string.Empty is returned. Concatenation stops when any markup is encountered, which can occur in a mixed content model or when an element end tag is read.
If positioned on an element Text node, this method performs the same concatenation from the Text node to the element end tag. If the reader is positioned on an attribute Text node, this method has the same functionality as if the reader were position on the element start tag.
Note to Inheritors
This method must be overridden in order to provide the functionality described above, as there is no default implementation. [Edit]
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0