Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 4th, 2004, 04:52 PM
Registered User
 
Join Date: Feb 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XLST transformNode problem

I am having trouble converting an XML file via XSL stylesheets when it is being pulled from a different server. I am certain that I have a working XSL file as I have tested it locally and by manually placing the XML file onto my server. The code that works is:

Code:
<%@ LANGUAGE=JScript %>

<%
var sourceFile = Server.MapPath("news.xml");
var styleFile = Server.MapPath("news.xsl");

var source = Server.CreateObject("MSXML2.DOMDocument");
var style = Server.CreateObject("MSXML2.DOMDocument"); 

source.async = false; 
source.resolveExternals = false; 
source.load(sourceFile);

style.async = false; 
style.resolveExternals = false;
style.load(styleFile);


Response.Write(source.transformNode(style));

%>
When I attempt to directly pull the XML file from a different site it does not work at all. Here is the code that will not work (using the same XSL file):
Code:
<%@ LANGUAGE=JScript %>

<%
    var xmlHTTP = Server.CreateObject("MSXML2.serverxmlhttp");
    xmlHTTP.open("GET", "http://www.gamespot.com/misc/rss/gamespot_updates_playstation_2.xml", false);
    xmlHTTP.send;

var styleFile = Server.MapPath("news.xsl");

var source = Server.CreateObject("MSXML2.DOMDocument");
var style = Server.CreateObject("MSXML2.DOMDocument"); 

source.async = false; 
source.resolveExternals = false; 
source.loadXML(xmlHTTP.ResponseText);

style.async = false; 
style.resolveExternals = false;
style.load(styleFile);

Response.Write(source.transformNode(style));

%>
Any help is greatly appreciated! Thanks!!

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
transformNode not working in firefox picky Javascript 0 December 20th, 2007 01:54 AM
how to use pagination in xsl or xlst vijayanmsc XSLT 1 June 6th, 2006 06:07 AM
XLST Multiple Foreach deepsweech XSLT 3 June 20th, 2005 09:46 AM
transformNode with xsl:script sonicDace XSLT 8 November 26th, 2003 09:40 AM
XLST vs Sever Controls skin XSLT 3 July 11th, 2003 01:29 PM



All times are GMT -4. The time now is 05:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.