Gets the qualified name of the node.
using System;
using System.IO;
using System.Xml;
public class Sample
{
public static void Main()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<book xmlns:bk='urn:samples'>" +
"<bk:ISBN>1-111111-11-1</bk:ISBN>" +
"<title>C#</title>" +
"</book>");
// Display information on the ISBN element.
XmlElement elem = (XmlElement) doc.DocumentElement.FirstChild;
Console.Write("{0} = {1}", elem.Name, elem.InnerText);
Console.WriteLine("\t namespaceURI=" + elem.NamespaceURI);
}
}
Related examples in the same category