This documentation is archived and is not being maintained.

Xml::Document Property

Note: This API is now obsolete. The non-obsolete alternative is DocumentContent. The non-obsolete alternative is DocumentSource.

Gets or sets the System.Xml::XmlDocument to display in the Xml control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[BrowsableAttribute(false)]
[ObsoleteAttribute(L"The recommended alternative is the XPathNavigator property. Create a System.Xml.XPath.XPathDocument and call CreateNavigator() to create an XPathNavigator. http://go.microsoft.com/fwlink/?linkid=14202")]
public:
property XmlDocument^ Document {
	XmlDocument^ get ();
	void set (XmlDocument^ value);
}
<asp:Xml Document="XmlDocument" />

Property Value

Type: System.Xml::XmlDocument
The System.Xml::XmlDocument to display in the Xml control.

The Document property is obsolete. To specify the XML that will be displayed in the Xml control, use the DocumentContent property or the DocumentSource property. For more information about these alternatives, see the class overview for the Xml control.

The XML document to display in the Xml control is specified in one of three ways. You can specify a System.Xml::XmlDocument object, an XML string, or an XML file by setting the appropriate property. The Document property is used to specify a System.Xml::XmlDocument (representing an XML document) to display in the control.

TopicLocation
How to: Load XML Data in the XML Web Server ControlBuilding ASP .NET Web Applications
How to: Load XML Data in the XML Web Server ControlBuilding ASP .NET Web Applications
How to: Add XML Web Server Controls to a Web Forms Page (Visual Studio)Building ASP .NET Web Applications in Visual Studio

The following code example shows how to create XmlDocument and XslTransform objects from a sample XML file and an XSL Transformation style sheet. The objects are then used by the XML control to display the XML document.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 1.1, 1.0
Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3.5
Obsolete (compiler warning) in 3.5 SP1
Obsolete (compiler warning) in 3.0
Obsolete (compiler warning) in 3.0 SP1
Obsolete (compiler warning) in 3.0 SP2
Obsolete (compiler warning) in 2.0
Obsolete (compiler warning) in 2.0 SP1
Obsolete (compiler warning) in 2.0 SP2

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: