parameter as xml filename

AG_

Usenet Archive
Joined
Feb 16, 2004
Messages
1
Reaction score
0
I have a .asp file looking like this:
PAGE01.ASP

<%@ Language=VBScript %>
<%
dim xml, xsl
set xml = Server.CreateObject("MSXML2.DOMDocument.4.0") set xsl = Server.CreateObject("MSXML2.DOMDocument.4.0") xml.load Server.MapPath(".") & "\xmlfile.xml" xsl.load Server.MapPath(".") & "\xmlfile.xsl" %> <html> <head> </head> <body> <%Response.Write xml.transformNode(xsl)%> </body> </html>

When I load it in the browser, it basically grabs the xml and xsl file transforms and displays.

The thing is, I have many, many xml files in the directory, and I nee "\xmlfile.xml" to be a variable/parameter being passed in the url.
It looks like this:
http://server/PAGE01.ASP?param=xmlfile02.xml

The variable is passed to PAGE01.ASP as param, and I'd like to use i to go to the directory and pull out the matching xml file.

Note:
this param can also be anything I'd like it to be.

I am way off on this but I have tried this:

<%@ Language=VBScript %>
<%
dim xml, xsl, order_no
order_no = Request.QueryString("order_no")
set xml = Server.CreateObject("MSXML2.DOMDocument.4.0") set xsl = Server.CreateObject("MSXML2.DOMDocument.4.0") xml.loadXML Server.MapPath(".") & Request.QueryString("order_no") 'xml.load Server.MapPath(".") & Request.QueryString("order_no") xsl.load Server.MapPath(".") & "\xmlfile.xsl" %> <html> <head> </head> <body> <%Response.Write xml.transformNode(xsl)%> </body> </html>

I'm not quite sure what is going on here.
I'm new to xml, very excited though at what I learned with this as page so far.

Any help anyone can offer would be appreciated

AG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top