Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET XML Control

ASP.NET XML Control


Web Server Controls Web Server Controls


Definition and Usage

The XML control is used to display an XML document or the result of an XSL transformation.

**Note:** Set at least one property for the XML document, otherwise no XML document will be displayed.

You can also specify an XSLT document that formats the XML document before it is written to the output stream. You can format the XML document by setting the Transform property or the TransformSource property.


property

property Description .NET
ClientID
Controls
Document Deprecated. Specifies the XML document using a System.Xml.XmlDocument object. 1.0
DocumentContent Specifies the XML string. 1.0
DocumentSource Specifies the path of the XML document displayed in the XML control. 1.0
EnableTheming
runat Specifies that the control is a server control. Must be set to "server". 1.0
SkinID
Transform Uses a System.Xml.Xsl.XslTransform object to format the XML document. 1.0
TransformArgumentList
TransformSource Specifies the path of the XSL transformation file.
XPathNavigator

Web Control Standard Properties

AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls, EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site, TemplateControl, TemplateSourceDirectory, UniqueID, Visible

For a complete description, please visit Web Control Standard Properties。


Example

XML
This example shows how to use the XML control to display the result of an XSL transformation.


Web Server Controls Web Server Controls