How can I read specific elements from XML string using XMLREADER in C#

前端 未结 2 882
-上瘾入骨i
-上瘾入骨i 2021-01-17 17:27

I have XML String:

   
      
   
   <         


        
2条回答
  •  执笔经年
    2021-01-17 17:51

    try this:

        string xml = " ";
        xml = "" + xml + "";
        XmlDocument doc = new XmlDocument();
        doc.LoadXml(xml);
        foreach (XmlNode node in doc.GetElementsByTagName("FieldRef"))
            Console.WriteLine(node.Attributes["Name"].Value);
    

提交回复
热议问题