System.Xml.XPath.XPathNavigator.ToString Method

Gets the text value of the current node.

Syntax

public override string ToString ()

Returns

A string that contains the text value of the current node.

Remarks

The content returned by the XPathNavigator.ToString method depends on the System.Xml.XPath.XPathNodeType of the node.

XPathNodeType.Root

The System.Xml.XmlNode.InnerText of the root node.

XPathNodeType.Element

The System.Xml.XmlNode.InnerText of the element.

XPathNodeType.Attribute

The value of the attribute.

XPathNodeType.Text

The content of the text node.

XPathNodeType.ProcessingInstruction

The entire content excluding the target.

XPathNodeType.Comment

The content of the comment.

XPathNodeType.Whitespace

The white space between mark-up.

XPathNodeType.SignificantWhitespace

The white space between markup in a mixed content model, or white space within an xml:space='preserve' scope.

Requirements

Namespace: System.Xml.XPath
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0