Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Load Method

XDocument.Load Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Static member Supported by Portable Class Library Load(Stream) Creates a new XDocument instance by using the specified stream.
Public method Static member Supported by the XNA Framework Load(String) Creates a new XDocument from a file.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library Load(TextReader) Creates a new XDocument from a TextReader.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library Load(XmlReader) Creates a new XDocument from an XmlReader.
Public method Static member Supported by Portable Class Library Load(Stream, LoadOptions) Creates a new XDocument instance by using the specified stream, optionally preserving white space, setting the base URI, and retaining line information.
Public method Static member Supported by the XNA Framework Load(String, LoadOptions) Creates a new XDocument from a file, optionally preserving white space, setting the base URI, and retaining line information.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library Load(TextReader, LoadOptions) Creates a new XDocument from a TextReader, optionally preserving white space, setting the base URI, and retaining line information.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library Load(XmlReader, LoadOptions) Loads an XDocument from an XmlReader, optionally setting the base URI, and retaining line information.
Top

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.

Show:
© 2015 Microsoft