Alquien puede explicarme por qué este código no funciona con un xml procedente de una url externa, y cómo tengo que hacer para qué funcione?
Es decir, esto sí funciona:
<%
Dim objXML
Dim objXSL
Dim strHTML
'Load the XML File
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.async = False
objXML.load(Server.MapPath("fichero.xml"))
'Load the XSL File
Set objXSL = Server.CreateObject("Microsoft.XMLDOM")
objXSL.async = False
objXSL.load(Server.MapPath("xmlxsl.xsl"))
' Transform the XML file using the XSL stylesheet
strHTML = objXML.transformNode(objXSL)
Set objXML = Nothing
Set objXSL = Nothing
' Spit out the resulting HTML... the data comes from the
' .xml file, but the formatting of the results depends
' completely upon the .xsl file.
Response.Write strHTML
%>
Pero esto no funciona:
<%
Dim objXML
Dim objXSL
Dim strHTML
'Load the XML File
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.async = False
objXML.load("http://www.url.com/fichero.xml")
'Load the XSL File
Set objXSL = Server.CreateObject("Microsoft.XMLDOM")
objXSL.async = False
objXSL.load(Server.MapPath("xmlxsl.xsl"))
' Transform the XML file using the XSL stylesheet
strHTML = objXML.transformNode(objXSL)
Set objXML = Nothing
Set objXSL = Nothing
' Spit out the resulting HTML... the data comes from the
' .xml file, but the formatting of the results depends
' completely upon the .xsl file.
Response.Write strHTML
%>
Gracias.