Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xmlHttp and ASP

Status
Not open for further replies.

rjonesX

Technical User
Jun 18, 2001
56
US
Its pretty simple what I need done. I need to pick up an xml file from...


using xmlHTTP in an ASP script located on a different server,

and have it transformed against a file called data.xsl

I tried this...

<%


Response.Buffer = True
Dim objXMLHTTP, xml

' Create an xmlhttp object:
Set xml = Server.CreateObject(&quot;Microsoft.XMLHTTP&quot;)
' Or, for version 3.0 of XMLHTTP, use:
' Set xml = Server.CreateObject(&quot;MSXML2.ServerXMLHTTP&quot;)

' Opens the connection to the remote server.
xml.Open &quot;GET&quot;, &quot; False

' Actually Sends the request and returns the data:
xml.Send


set xsl = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
xsl.async = false
xsl.load(Server.MapPath(&quot;../events/events.xsl&quot;))

Response.Write(xml.transformNode(xsl))
%>

BUt it says that transformNode is not acceptable... any ideas?
 
hi
try this it will definately works
<script>
xmldoc = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);
xmldoc.async = false;
xmldoc.load(&quot;
xsldoc = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);
xsldoc.async = false;
xsldoc.load(&quot;</script>

<script>
document.write(xmldoc.transformNode(xsldoc));
</script>

rgds
prasad

sawantprasad2001@yahoo.com
 
hey tell me its work or not work
u did not reply to me

Bye

Prasad
 
Sorry, I have been fooling around with it but I have not yet gotten it to work... Part of the reason is that the xsl file is a complete file of sorts, it is not to be included but rather is to exist as the whole page... Make sense?

Traditiaonally I have run it like this...

<%
'Load the XML
set xml = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
xml.async = false
xml.load(Server.MapPath(&quot;data/calendar/data.xml&quot;))

'Load the XSL
set xsl = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
xsl.async = false
xsl.load(Server.MapPath(&quot;xsl/calendar.xsl&quot;))

Response.Write(xml.transformNode(xsl))
%>

so that the tranform was server side. I basically want to do the same thing but find a way that the the xsl.load function will pick up from and events.xsl

thanks in advance

russ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top