How to get attribute in the XDocument object

后端 未结 2 449
刺人心
刺人心 2020-12-08 20:12

I have this xml


    

I want my code to able to

相关标签:
2条回答
  • 2020-12-08 20:15

    You should take a look at XElement

    article at c-sharpcorner.com

    0 讨论(0)
  • 2020-12-08 20:38

    You need to get the attribute of the <audio> element:

    string value = xdoc.Root.Element("audio").Attribute("first").Value;
    
    0 讨论(0)
提交回复
热议问题