The second example demonstrates how to use an Xml Data Source control with a templated Repeater control to display XML data.

The following code example demonstrates how to use an Xml Data Source control with a Tree View control to display XML data.

Because the Xml Data Source control extends the Hierarchical Data Source Control class, it works with hierarchical data.

updating xmldatasource-75

Page developers use the Xml Data Source control to display XML data using data-bound controls.

The Xml Data Source typically loads XML data from an XML file, which is specified by the Data File property.

The Xml Data Source loads XML data from the XML file identified by the Data File property.

The following code example demonstrates how to use an Xml Data Source control with a templated Repeater control to display XML data.

The XPath property supports an XPath-syntax filter that is applied after XML data is loaded and transformed.

For performance purposes, caching is enabled for the Xml Data Source control by default.

However, you can also use the Xml Data Source control to edit XML data.

To edit the XML data, call the Get Xml Document method to retrieve an Xml Data Document object that is an in-memory representation of the XML data.

The Get View Names method identifies this single named view.