XDocument.Load Method

 

Creates a new XDocument from a file specified by a URI, from an TextReader, or from an XmlReader.

Namespace:   System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticLoad(Stream)

Creates a new XDocument instance by using the specified stream.

System_CAPS_pubmethodSystem_CAPS_staticLoad(Stream, LoadOptions)

Creates a new XDocument instance by using the specified stream, optionally preserving white space, setting the base URI, and retaining line information.

System_CAPS_pubmethodSystem_CAPS_staticLoad(String)

Creates a new XDocument from a file.

System_CAPS_pubmethodSystem_CAPS_staticLoad(String, LoadOptions)

Creates a new XDocument from a file, optionally preserving white space, setting the base URI, and retaining line information.

System_CAPS_pubmethodSystem_CAPS_staticLoad(TextReader)

Creates a new XDocument from a TextReader.

System_CAPS_pubmethodSystem_CAPS_staticLoad(TextReader, LoadOptions)

Creates a new XDocument from a TextReader, optionally preserving white space, setting the base URI, and retaining line information.

System_CAPS_pubmethodSystem_CAPS_staticLoad(XmlReader)

Creates a new XDocument from an XmlReader.

System_CAPS_pubmethodSystem_CAPS_staticLoad(XmlReader, LoadOptions)

Loads an XDocument from an XmlReader, optionally setting the base URI, and retaining line information.

Using one of the overloads of this method, you can load an XDocument from a file, a TextReader, or an XmlReader.

To create an XDocument from a string that contains XML, use Parse.

Return to top
Show: