XML Web Server Control
in ASP.NET environment,This article describes you how to work with Wizard Web Control.This XML control allows the user to work with this instead of working with Database.An Xml Web server control reads XML and writes it into a Web Forms page at the location of the control. If an XSL transformation (XSLT) is applied to the XML, the resulting transformed output will be rendered in the Web Forms page.
This XML web control enables two ways to reference external documents using property settings in the XML Web server control. first way can provide a path to the XML document in the control tag, second way can load the XML and XSLT documents as objects and then pass them to the control
Displaying an XML Document in a Page
To display XML information on a Web page,One way to provide these instructions is to create an ASP.NET Web page and then use code to parse the XML file and fill the data into the appropriate HTML tags. Although this is a somewhat time-consuming and inflexible way to do this, it is also a powerful way that gives you precise programmatic control over the XML file.
to use the XSL transformation language and create transformations, or XSL files, An XSL transformation contains the following information:
- A template
-an HTML page with the appropriate tags — that specifies how the XML information should be displayed.
- XSL processing instructions, which specify exactly how the information from the XML file fits into the template.
Once you have XSL transformations, you need to apply them to the XML file — that is, you process the XML file by transforming it according to one of the XSL files. The output is a new file with the XML information formatted according to the transformation file.
to use the Xml server control to display XML information using XSL transformations, you must have the following,
- An XML file containing several fictional e-mail messages
- Two XSL transformations. One displays only the date, sender, and subject of the e-mail messages. The other displays the entire e-mail message.
To Adding the XML File and XSL Transformations
- In Solution Explorer, right-click the App_Data folder, and then click Add New Item.
- Under Visual Studio installed templates, click XML file.
- In the Name box, type TextXml.xml.
- Click Add.
- Copy the following XML data, and then paste it into the XML file