Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 4th, 2004, 04:52 PM
Registered User
 
Join Date: Feb 2004
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!!






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





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