Home   |   QuickStart Welcome   |   ASP.NET   |   Web Services   |   How Do I...?   
  |   I want my samples in...      

ASP.NET 2.0 Quickstart Tutorials

Xml

The Xml control can be used to write out an XML document or the results of an XSL Transform. The DocumentSource specifies the XML document to use. This document will be written directly to the output stream unless TransformSource is also specified. TransformSource must be a valid XSL Transform document and will be used to transform the XML document before its contents are written to the output stream. The following sample illustrates using a simple Xml control.

VB Xml1.aspx
Run Sample View Source


A preloaded XMLDocument can be passed to the Document property of the Xml control. You can also pass a preloaded XSLTransform to the Transform property of the Xml control. The following sample illustrates creating custom XMLDocument and XSLTransform objects, then passing them into the Xml control to be displayed.

VB Xml2.aspx
Run Sample View Source