Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 27th, 2004, 05:55 AM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to humour
Default Add XSLT transformed XML (html) on an aspx page


I have a normal (traditional) aspx page. What I want is to load some XSLT that transforms XML into html and have that HTML rendered on a specific spot on the page.

Can someone
- clip me a code fragment
- or point me to a tutorial to achieve this

thx in advance
 
Old September 30th, 2004, 03:57 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Add this code snippet in your aspx page..This will output the HTML in the page...

XmlDocument docXml = new XmlDocument();
XslTransform docXsl = new XslTransform();
docXml.LoadServer.MapPath("default.xml");
docXsl.Load(Server.MapPath("default.xsl"));
docXsl.Transform(docXml,null,Response.OutputStream ,null);

 
Old September 30th, 2004, 05:13 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Have a look at the asp:Xml control.



--

Joe (Co-author Beginning XML, 3rd edition)




Similar Threads
Thread Thread Starter Forum Replies Last Post
add HTML tags via XSLT chopswil2 XSLT 3 November 5th, 2007 09:30 AM
html(aspx) web page sivkum Javascript 1 January 11th, 2007 01:53 AM
convert Html in aspx page prashantraizada2002 ASP.NET 1.0 and 1.1 Basics 1 June 24th, 2006 04:55 PM
Adding XSLT transformed XML content dynamically jacob ASP.NET 1.x and 2.0 Application Design 2 December 1st, 2005 04:40 PM
Generating aspx pages with xml and xslt glaseur XSLT 4 December 3rd, 2003 05:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.