Transform XML into HTML Using XSLT
page 1 of 4
Published: 04 Jun 2007
Abstract
In this article Haissam Abdul Malak examines how to output an HTML page from an XML file using XSLT.
by Haissam Abdul Malak
Feedback
Average Rating: 
Views (Total / Last 10 Days): 114727/ 106

Introduction

For demonstration purposes, we will create a simple search engine in which XSLT is used to iterate through the XML file (data retrieved from the database) to display the data based on the user entered criteria. It consists of user information, such as First Name, Last Name, Email, etc. Also we will give the user the ability to search in a specified category and in which order the data should be displayed. This option is hidden by default; a button is used to allow the user to specify more options to his or her search.

Throughout this article we have to complete the following steps.

·         Create an XML document containing users' information.

·         Create an XSL file which will navigate through the XML document.

·         Write code behind to transform the XML into HTML.


View Entire Article

User Comments

Title: sql server   
Name: rajesh kumar jha
Date: 2011-07-23 8:33:12 AM
Comment:
this is a very good database for
software
Title: .net to java   
Name: rajesh jha
Date: 2011-07-23 8:31:35 AM
Comment:
this is very good site for all proggramer
Title: Hi   
Name: Pavan
Date: 2011-05-04 8:58:55 AM
Comment:
this is the best site
Title: xml to html   
Name: Saravanan
Date: 2011-02-21 1:42:31 AM
Comment:
Hi all,

i am currently into module where i need to convert a Indesign layout to a web page, i need to get the same design as html, what is there in the Indesign layout.

Please anyone help me

Thanks,
Saravanan
Title: tes   
Name: trial
Date: 2010-10-06 1:20:11 AM
Comment:
user friendly
Title: Short Title   
Name: test
Date: 2009-09-17 6:38:43 AM
Comment:
this is a test for xml to html conversion and i just wana test how it will finally look like in the html version..
This has to happen through xslt transformations and user have the option to search in xml file using this option..
Title: xml document to html document   
Name: Bertrand Gillert
Date: 2009-06-30 1:50:14 PM
Comment:
Hi! We need to create a HTML preview for translation of a complicated catalog. The source is xml, we even have a .xsl. But the .xsl does not display the pictures (which we also have). The xml contains the product ids, the picture file names correspond to the product id. Is there a way to map the product ids to the file names and display the pictures within the loop?
Title: xml document to html document   
Name: Andy Symonds
Date: 2009-06-03 5:00:27 PM
Comment:
hi erm im tryin to make an xml document into html document the xml document is a conversation over a months period i tried to open it to read it like the other files (the html files) but it wont let me so can u tell me how i could sort this problem out
Title: Embedding XML/XSL source   
Name: Matt
Date: 2009-04-30 12:20:28 AM
Comment:
It is possible to embed the xml/xsl sources with in the executable itself. Imagine in your particular example that SearchEngine.Xsl and SearchEngine.xml were propriatary. Could you somehow embed these files as .NET resources or something such that the ultimate user of the .NET executable could not read the content of the xml/xsl files?
Title: Test   
Name: Kani
Date: 2009-03-28 9:04:17 AM
Comment:
Test for XML to HTML Document
Title: testvipul   
Name: testvipul
Date: 2009-02-06 3:28:47 AM
Comment:
this is a test for xml to html conversion and i just wana test how it will finally look like in the html version..
This has to happen through xslt transformations and user have the option to search in xml file using this option..
Title: feedback for Haissam Abdul Malak article   
Name: kannan from india
Date: 2008-11-06 1:15:58 AM
Comment:
i have one question, may be u can help me..
how to add images include in this xslt and convert to html..
Title: how to Write code behind to transform the XML into HTML.   
Name: Jagadeesh
Date: 2008-05-29 5:35:47 AM
Comment:
How to write code to convert from xml to html
Title: Article is very good but Not working for me.   
Name: Sushil Dhanuka
Date: 2008-04-22 8:20:44 AM
Comment:
Hi Haisaam,

This article is very good but somehow not working for me as I made small changes. I am loading this XSL and XML file directly in HTML using javascript. I do not get any search results.

If you can send me email where I can attach my XSL and HTML files.

It would be very helpful for me.

Thanks in advance

Kind Regards
Title: Good one to know XSLT   
Name: Anjaneya
Date: 2008-02-12 6:55:04 AM
Comment:
Good Article
Title: Prefix add in URl   
Name: Mukesh
Date: 2007-12-27 4:32:31 AM
Comment:
how to add the prefix http if it not added by user.
if user write google.com it convert to http://www.google.com
Title: Please help on xslt   
Name: Bao
Date: 2007-12-07 4:46:29 AM
Comment:
Hi Abdul Malak,

I have a question maybe you can help,

Is it possible to read from an HTML form (like the ones that you have on the internet to register to forums, etc) and yo save it into a xml file with XSLT by clicking on a button 'save'?

many thanks for your help !

Bao
Title: Very good.   
Name: Jignesh raval
Date: 2007-11-27 7:08:00 AM
Comment:
I have read your artical, you have explained in such a good manner, very nice and very usefull.

Thank you.

Jignesh Raval, India
Title: Beautiful   
Name: Guido
Date: 2007-07-11 2:26:38 PM
Comment:
Nice explanation. Hopefully I would be able to change it for my project
Title: Transform XML into HTML Using XSLT   
Name: chanchal choudhary
Date: 2007-06-11 12:46:33 AM
Comment:
Really good and complete help which satisfies its title completely
Amust read for people who are new to xml transform
Title: Re:Missing Information   
Name: Haissam Abdul Malak
Date: 2007-06-04 11:26:34 AM
Comment:
check the below link to download the project
http://authors.aspalliance.com/HabdulMalak/1296.zip

Regards,
Title: Missing Information   
Name: Jim Arthur
Date: 2007-06-04 9:45:25 AM
Comment:
From your article under Javascript section "To check how to embed JavaScript inside XSLT, please download the project file."
So, where is the download link?
Title: Nice one!   
Name: Bilal Haidar [MVP]
Date: 2007-06-04 9:21:40 AM
Comment:
Nice article as usual!
I am still waiting for the series ;)

Regards

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-02-27 1:39:55 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search