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.
精彩评论