Populate XDocument from String Populate XDocument from String xml xml

Populate XDocument from String


How about this...?

TextReader tr = new StringReader("<Root>Content</Root>");XDocument doc = XDocument.Load(tr);Console.WriteLine(doc);

This was taken from the MSDN docs for XDocument.Load, found here...

http://msdn.microsoft.com/en-us/library/bb299692.aspx