开发者

xmlElement parser need in c#

I need to simple xml parser like below.

xmlNode root=xmlDoc.DocumentElement;
root.appendChild(xmlElement.Parse("<book 开发者_如何转开发name='ff'>sample </book>");

is there any parser library or extension method like this .Parse("<book name='ff'>sample </book>")


If you're using .Net 3.5, you can use the XElement class to do exactly this. Check out the documentation for XElement.Parse().


Consider using the newer Linq-to-Xml system in System.Xml.Linq. There is an XElement.Parse(string xml) function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜