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
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