0 Comments

If you want to convert a string containing XML to a XDocument object, use:

var document = XDocument.Parse(@"<?xml version=""1.0""?><root></root>");

For converting XmlDocument to XDocument and vice versa, see: http://blogs.msdn.com/marcelolr/archive/2009/03/13/fast-way-to-convert-xmldocument-into-xdocument.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts