I'm working on an old software written in classic ASP (VBScript).
I should create an asp page that makes an XSL transformation. I'm able to do this using static files but I have to work with XML files dynamically generated by asp pages (this doesn't work).
This is my code:
Dim document, stylesheet, o
Set document = Server.CreateObject("Msxml2.DOMDocument")
document.async = False
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://localhost/aaa/cgi-bin/fo/file.asp?id_x=39", False
o.send
'document.load Server.MapPath("test.xml") ' <- with static file is working
'document.loadXML(o.responseText) ' <- not working
document.load o.responseXML ' <- not working
Set stylesheet = Server.CreateObject("Msxml2.DOMDocument")
stylesheet.async = False
stylesheet.load Server.MapPath("test.xslt")
'Response.Write o.responseText ' <- working! (return the correct XML)
'Response.Write o.responseXML.xml ' <- not working (empty result)
Response.Write document.transformNode(stylesheet)
Set document = Nothing
Set stylesheet = Nothing
All is running on a virtual machine with Windows 2000 Server (unfortunately I need to do this in this way).
Thank you for your help.