Displaying content in ASP page using XML and XSLT

Using xml and xsl to display content in an asp page is very simple. It involves just three major steps. You can try this in a matter of just 10 minutes.


_______________________________________________

The first step is to create two xml document objects. One is for holding the xml file and the other is for holding the xsl file. Use Server.CreateObject to create two such objects and name it appropriately.

The second step is to use the Load method of the xml document object to load the xml and the xsl files. You should know that this load method takes only the physical path of the document. To get the physical path of the xml and the xsl file we use the Server.MapPath method.

Now the third and the final step is to transform the xml document using the xsl document and display the result as a html file. This is done by using the xmlobject's transformNode method. This is passed as an argument to the Response.Write method.





_______________________________________________

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________








 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

Copyright - © 2004 - 2017 - All Rights Reserved.