XDocument.Descendants not returning descendants

前端 未结 4 1678
暗喜
暗喜 2020-12-17 07:41



        
4条回答
  •  既然无缘
    2020-12-17 08:34

    You're not including the namespace, which is "http://www.lge.com/ddc", defaulted from the parent element:

    XNamespace ns = "http://www.lge.com/ddc";
    foreach (XElement element in xdoc.Descendants(ns + "nationalList"))
    {
        ...
    }
    

提交回复
热议问题