Select Nodes By Namespace : Xml Node : XML C# Examples


C# Examples » XML » Xml Node »

 

Select Nodes By Namespace









    
using  System;
using  System.Xml;

public  class  MainClass  
{
    [STAThread]
    private  static  void  Main()
    {
        XmlDocument  doc  =  new  XmlDocument();
        doc.Load("Sample.xml");

        XmlNodeList  matches  =  doc.GetElementsByTagName("*",  "http://mycompany/OrderML");

        foreach  (XmlNode  node  in  matches)
        {
            Console.WriteLine(node.Name  );
            foreach  (XmlAttribute  attribute  in  node.Attributes)
            {
                Console.WriteLine(attribute.Value);
            }
        }
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo XML
» Xml Node