XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 13th, 2004, 08:42 AM
lauriek lauriek is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 2 lauriek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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
--

Reply With Quote
  #2  
Old April 13th, 2004, 12:04 PM
verolaet verolaet is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: France/Paris
Posts: 30 verolaet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 30 sec
Reputation Power: 6
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Transform remote XML with local XSLT using ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT