XML and XSL Transformation Class Demo

This demo illustrates the XML_Handler class that can be used to display XML data (with or without an XSL stylesheet). This demo illustrates how to display XML data using an already-created XSL stylesheet. The XML data can be seen here. The XSL stylesheet can be seen here.

Note that the code for this demo is dependent upon an include file, XML_Handler.class.asp, which can be seen here. Note that this class simply defines the XML_Handler class.

FoxNews: Top News
- Cell Transplant May Be Cure for Diabetes
- House to Vote on Shark-Protecting Bill
- New Museum Commemorates 'The Longest Day'
Time: Time Daily
- The White House E-mails: Too Little, Too Late
- The Really, Really Bad Fat
US News: World Report
- Einhorn: Victim or monster?
- Discredited election stirs unrest in Peru
- Pentagon envisions a missile shield for wary allies
- The voice of hate radio in Rwanda is sentenced
- Israel ends its 22-year occupation of southern Lebanon

Source Code
<!--#include file="XML_Handler.class.asp"-->
	Dim cls_XML ' As New XML_Handler
	Dim strXMLDoc ' As String
	Dim strXSLDoc ' As String
	strXMLDoc = Server.MapPath("/demos/news.xml")
	strXSLDoc = Server.MapPath("/webtech/code/home_News.xsl")

	Set cls_XML = New XML_Handler

	cls_XML.LoadXML strXMLDoc
	cls_XML.LoadXSL strXSLDoc

	Response.Write(cls_XML.Execute("HTML")) '--Transforms XML/XSL

	Set cls_XML = Nothing	'Clean up

[Return to the article] | [Download the XML_Handler class]