I need to complete a task, although I am not quite sure how?

The task is to create a very unusual search system for a car rental site.

There is a database of cars that the rental company possesses, and when the user specifies the rental dates - the list of available cars should be presented to the user. But the thing is that they should be presented in the XML format using XSLT transformation.

The question is:
How to transform database search results into a structured XML document and present it on an ASP.NET webform?

All suggestions are welcome, if you need some more specific info, feel free to ask.

Thank you!

hey buddy,

try this

open a sqlcommand object and execute your search query.
take those results in a dataadapter and assign to a dataset
then load the dataset to an xmlfile. you can do that. it's easy.
Finally using response.binarywrite u can flush the xml content to your browser.

thx
chaitanya

You shouldn't send an XML file with a linked transform directive directly to the user's browser. Not all browsers support client-side XSL transformations.

You should look for a server-side XSL processor, perform the transformation at the server end, and send (X)HTML.

There should be an ASP-ready XSL processor on Windows Servers based on MSXML (www.perfectxml.com/articles/xml/XSLTInMSXML.asp . See if it's on your server, if not, ask for/install it.

That's the same processor used by MSIE for client-side transforms; doing the process at your server though, means that you can serve to browsers other than MSIE and FF.

This article has been dead for over six months. Start a new discussion instead.