
08/10/2005, 12:19
|
 | | | Fecha de Ingreso: febrero-2002 Ubicación: Granada
Mensajes: 431
Antigüedad: 23 años, 2 meses Puntos: 2 | |
xslt+xml+asp 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.
Última edición por mrgubu; 30/10/2005 a las 13:10 |