I need to convert an XML string into an XmlElement

后端 未结 5 811
一个人的身影
一个人的身影 2020-12-14 00:05

I\'m looking for the simplest way to convert a string containing valid XML into an XmlElement object in C#.

How can you turn this into an XmlEleme

5条回答
  •  执笔经年
    2020-12-14 00:18

    You can use XmlDocument.LoadXml() to do this.

    Here is a simple examle:

    XmlDocument xmlDoc = new XmlDocument(); 
    xmlDoc.LoadXml("YOUR XML STRING"); 
    

提交回复
热议问题