|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Transform remote XML with local XSLT using ASP
Hi,
I have the following classic ASP script working to do a transform on some local XML using a local XSLT. <% sourceFile = Server.MapPath("top100.xml") styleFile = Server.MapPath("_top100.xslt") set source = Server.CreateObject("Microsoft.XMLDOM") source.async = false source.load(sourceFile) set style = Server.CreateObject("Microsoft.XMLDOM") style.async = false style.load(styleFile) Response.Write source.transformNode(style) %> I need to enhance this to get the XML from a remote server (served by http). I have tried to use this component - Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") to read the remote XML into an object, and have managed to read in and display the remote XML using this but I cannot work out how to combine this with the XSLT tranform. Any advice would be much appreciated! Regards Laurie -- |
|
#2
|
|||
|
|||
|
Hi Laurie,
First, if you use Server.CreateObject etc... you are already on a distant server called by http (even if you work on you local machine). I don't understand why you can manage to work with your code. I use Dim oXml Set oXml = Server.CreateObject("MSXML2.DOMDocument") oXml.async = false oXml.load fileXml Dim oXsl Set oXsl = Server.CreateObject("MSXML2.DOMDocument") oXsl.async = false oXsl.load fileXsl Response.write oXml.transformNode(oXsl) That looks pretty much the same and it works well. If your manage to read the XML, the XML parser on the server is ok. Can you give me some more pieces of information on your pb? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Transform remote XML with local XSLT using ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|