This documentation is archived and is not being maintained.

XPathNavigator.ToString Method

Gets the text value of the current node. This method is equivalent to returning the Value property.

[Visual Basic]
Overrides Public Function ToString() As String
public override string ToString();
public: String* ToString();
public override function ToString() : String;

Return Value

The content returned depends on the NodeType of the node.

Node Type Value
Attribute The value of the attribute.
Element The InnerText of the element.
Comment The content of the comment.
ProcessingInstruction The entire content excluding the target.
Text The content of the text node.
Whitespace The white space between mark-up.
SignificantWhitespace The white space between markup in a mixed content model or white space within an xml:space= 'preserve' scope.
Root The InnerText of the root node.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

XPathNavigator Class | XPathNavigator Members | System.Xml.XPath Namespace