System.Web.UI.WebControls.XmlDataSource.GetXmlDocument Method

Loads the XML data into memory, either directly from the underlying data storage or from the cache, and returns it in the form of an System.Xml.XmlDataDocument object.

Syntax

public System.Xml.XmlDocument GetXmlDocument ()

Returns

An System.Xml.XmlDataDocument object that represents the XML specified in the XmlDataSource.Data property or in the file identified by the XmlDataSource.DataFile property, with any transformations and XmlDataSource.XPath queries applied.

Remarks

Use the XmlDataSource.GetXmlDocument method for direct access to an in-memory representation of the underlying XML data.

You can manipulate the returned System.Xml.XmlDataDocument object and then call XmlDataSource.Save to persist your changes to the XML file specified by the XmlDataSource.DataFile property. Several requirements must be met before the System.Xml.XmlDataDocument object can be saved successfully. For more information, see the XmlDataSource.Save method.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0