I want to convert a string to XML. Of course I can do something like:
"<node Attribute1="att1">" + MyString + "</node>"
But why reinvent the wheel if there’s something in .net for it. Is there a method that takes a node-name, attributes, and inner XML and returns an XML string?
You can use Linq To Xml
would give you