Latest web development tutorials

ASP.NET XML control

Web Server Controls Web server control

Definition and Usage

XML control used to display the results of XML documents or XSL transformations.

Note: At least one attribute set as an XML document, otherwise there will be no XML document display.

You can also specify an XSLT document, an XML document is formatted before the document is written to the output stream in the XML document. You can format the XML document by setting the Transform property or TransformSource property.


Attributes

属性 描述 .NET
ClientID
Controls
Document 不赞成使用。规定使用 System.Xml.XmlDocument 对象的 XML 文档。 1.0
DocumentContent 规定 XML 字符串。 1.0
DocumentSource 规定在 XML 控件中显示的 XML 文档的路径。 1.0
EnableTheming
runat 规定该控件是服务器控件。必须设置为 "server"。 1.0
SkinID
Transform 使用 System.Xml.Xsl.XslTransform 对象来格式化 XML 文档。 1.0
TransformArgumentList
TransformSource 规定 XSL 转换文件的路径。
XPathNavigator

Control Standard Properties

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

For a full description, go to Control Standard Attributes .


Examples

XML
This example shows how to use the XML control to display the results of XSL transformations.


Web Server Controls Web server control