XDocument Constructor (XDocument)

XDocument Constructor (XDocument)


Initializes a new instance of the XDocument class from an existing XDocument object.

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

public XDocument(
	XDocument other


Type: System.Xml.Linq.XDocument

The XDocument object that will be copied.

You use this constructor to make a deep copy of an XDocument.

This constructor traverses all nodes and attributes in the document specified in the other parameter, and creates copies of all nodes as it assembles the newly initialized XDocument.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft