How do I load an XDocument when the xml is in a string variable?
+10
A:
XDocument.Parse(yourvariable)
http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.parse.aspx
Mike Gleason jr Couturier
2009-11-26 16:27:49
I think this only available in .NET 3.5 and higher.
CodeSavvyGeek
2009-11-26 16:38:14
If he's using XDocument over XmlDocument, he's already using .NET 3.5 with probably LINQ to XML!
Mike Gleason jr Couturier
2009-11-26 16:46:47
Good point. I misread the question.
CodeSavvyGeek
2009-11-26 16:58:08
No problem, happens to me all the time :)
Mike Gleason jr Couturier
2009-11-26 18:33:31