Selecting namespaced XML node attributes with namespace alias instead of URI on an XElement

前端 未结 2 2028
一整个雨季
一整个雨季 2021-01-21 12:16

I\'m trying to query out some information from a heavily namespaced XML document and am having some trouble finding attributes that are also namespaced.

The XML looks li

2条回答
  •  醉酒成梦
    2021-01-21 12:44

    You can use System.Linq:

    country.Attributes().Where(a => a.Name.LocalName == "notation")?.First()?.Value;
    

提交回复
热议问题