System.Xml.IHasXmlNode.GetNode Method

Returns the System.Xml.XmlNode for the current position.

Syntax

public XmlNode GetNode ()

Returns

The XmlNode for the current position.

Remarks

The following C# code uses GetNode to access a node the System.Xml.XPath.XPathNavigator is currently positioned on.

Example

 XmlDocument doc = new XmlDocument();
 doc.Load("books.xml");
 XPathNavigator nav =  doc.CreateNavigator();
 XmlNode node = ((IHasXmlNode)nav).GetNode();
 Console.WriteLine(node.LocalName); 
 //You can edit the returned XmlNode.

Requirements

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