| |||||||||||||||||||||||
Xml Control SyntaxASP.NET Syntax ASP.NET Syntax for Web Controls Displays an XML document or the results of an XSL Transform. For information on the individual members of this class, see Xml in the class library. RemarksThe Xml control renders the contents of an XML document or the results of an XSL Transform. The XML document to display is specified by setting one of three properties. These three properties represent the different types of XML documents that can be displayed. You can display a System.Xml.XmlDocument object, an XML string, or an XML file by setting the appropriate property. The following table lists the properties for specifying the XML document.
You can optionally specify an XSL Transform document that formats the XML document before it is written to the output stream by setting one of two properties. The two properties represent the different types of XSL Transform documents that can be used to format the XML document. You can format the XML document with a System.Xml.Xsl.XslTransform object or an XSL Transform file by setting the appropriate property. If no XSL Transform document is specified, the XML document is displayed using the default format. The following table lists the properties for specifying an XSL Transform document.
Syntax ExampleThe following example demonstrates how to use the Xml control to display an XML file using an XSL Transform file.
<html>
<body>
<h3>Xml Example</h3>
<form runat=server>
<asp:Xml id="myXml"
DocumentSource = "people.xml"
TransformSource = "people.xsl"
runat="server" />
</form>
</body>
</html>
The following example demonstrates how to create XmlDocument and XslTransform objects from an XML and XSL Transform files. The objects are then used by the Xml control to display the XML document.
See AlsoXml Class Xml Web Server Control |
| ||||||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme