Share via


IHasXmlNode.GetNode Metodo

Definizione

Restituisce l'oggetto XmlNode della posizione corrente.

public:
 System::Xml::XmlNode ^ GetNode();
public System.Xml.XmlNode GetNode ();
abstract member GetNode : unit -> System.Xml.XmlNode
Public Function GetNode () As XmlNode

Restituisce

XmlNode della posizione corrente.

Commenti

Il codice C# seguente usa GetNode per accedere a un nodo XPathNavigator in cui è attualmente posizionato.

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.  

Si applica a