System.Xml.Linq.XDocument
Represents an XML document. For the components and usage of an XDocument object, see XDocument Class Overview.To browse the .NET Framework source code for this type, see the Reference Source.
Gets or sets the XML declaration for this document.
Gets the Document Type Definition (DTD) for this document.
Gets the root element of the XML Tree for this document.
public XDocument()
Initializes a new instance of the XDocument class.
Initializes a new instance of the XDocument class with the specified content.
Initializes a new instance of the XDocument class with the specified XDeclaration and content.
Creates a new XDocument from a file.
Creates a new XDocument from a file, optionally preserving white space, setting the base URI, and retaining line information.
Creates a new XDocument instance by using the specified stream.
Creates a new XDocument instance by using the specified stream, optionally preserving white space, setting the base URI, and retaining line information.
Creates a new XDocument from a TextReader.
Creates a new XDocument from a TextReader, optionally preserving white space, setting the base URI, and retaining line information.
Loads an XDocument from an XmlReader, optionally setting the base URI, and retaining line information.
Creates a new XDocument from a string.
Creates a new XDocument from a string, optionally preserving white space, setting the base URI, and retaining line information.
Serialize this XDocument to a TextWriter.
Serialize this XDocument to a TextWriter, optionally disabling formatting.