This documentation is archived and is not being maintained.

Xml.DocumentSource Property

Gets or sets the path to an XML document to display in the Xml control.

[Visual Basic]
Public Property DocumentSource As String
public string DocumentSource {get; set;}
public: __property String* get_DocumentSource();
public: __property void set_DocumentSource(String*);
public function get DocumentSource() : String;
public function set DocumentSource(String);

Property Value

The path to an XML document to display in 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 DocumentSource property is used to specify the path to an XML file (representing an XML document) to display in the control. You can use a relative or an absolute path. A relative path relates the location of the file to the location of the Web Forms page or user control, without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the file in code. An absolute path provides the complete path, so moving the site to another directory requires updating the code.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Xml Class | Xml Members | System.Web.UI.WebControls Namespace | Document | DocumentContent | Transform | TransformSource