Use Linq to Xml with Xml namespaces

前端 未结 4 1809
深忆病人
深忆病人 2020-11-22 15:19

I have this code :

/*string theXml =
@\"

        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 16:09

    I found the following code to work fine for reading attributes with namespaces in VB.NET:

    MyXElement.Attribute(MyXElement.GetNamespaceOfPrefix("YOUR_NAMESPACE_HERE") + "YOUR_ATTRIB_NAME")
    

    Hope this helps someone down the road.

提交回复
热议问题