Xml Server Control

The Xml server control can be used to display either raw XML output or XML data with an XSL/T stylesheet. All in all, this is a rather simple server control with only a few properties. Table 12.1 shows the properties of the Xml server control.

Table 12.1. Xml Server Control Properties
Property Get or Set Description
DocumentSource Get/Set Gets or sets the path to the XML file to display.
TransformSource Get/Set Gets or sets the path to the XSL/T stylesheet to use.
Document Get/Set Gets or sets the XmlDocument to display.
Transform Get/Set Gets or sets the XslTransform to display.

To display an XML file in the browser using the Xml server control, you obviously need an XML file. Listing 12.1 shows the products.xml file, which ...

Get Programming Data-Driven Web Applications with ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.