Creates a new XDocument from a TextReader.
static member Load :
textReader:TextReader -> XDocument
A TextReader that contains the content for the XDocument.
LINQ to XML's loading functionality is built upon XmlReader. Therefore, you might catch any exceptions that are thrown by the XmlReader.Create overload methods and the XmlReader methods that read and parse the document.
The following example creates a document from a StringReader.
This example produces the following output: