How to read XML in C# using Xpath

后端 未结 3 755
耶瑟儿~
耶瑟儿~ 2020-12-06 12:18

I have this XML




        
3条回答
  •  悲哀的现实
    2020-12-06 12:51

    as @Kirill Polishchuk answered - SKUDetails is defined in http://tempuri.org/

    he shows you how to get using XDocument

    you can use alsow XmlDocument like this:

    var dom = new XmlDocument();
    dom.Load("data.xml");
    var mgr = new XmlNamespaceManager(dom.NameTable);
    mgr.AddNamespace("a", "http://tempuri.org/");
    var res = dom.SelectNodes("//a:SKUDetails", mgr);
    

提交回复
热议问题