Mono Class Library: System.Xml.XmlTextReader Overview | MembersSystem.Xml.XmlTextReader.ReadString Method |
Reads the contents of an element or a 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 InvalidOperationException An invalid operation was attempted. [Edit] System.Xml.XmlException An error occurred while parsing the XML. [Edit]
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:[Edit]This method overrides XmlReader.ReadString.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0