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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML transformation using XSL

Status
Not open for further replies.

anokes

Programmer
Dec 12, 2001
2
US
I am attempting to pull XML from an external site using an ASP page which loads the XML then loads the XSL for formatting. I've tried this with a local XML file and it works great. When I try to access an external XML file via a url it won't return data. Any ideas? Here is my code:

<%@ Language=VBScript %>

<%
startTable=&quot;<table bgColor=#f0f8ff border=0 cellPadding=2 WIDTH=100% cellSpacing=0><tr><td bgcolor=midnightblue><font color=white face=Arial size=2><strong>&quot;
startTableEnd=&quot;</strong></font></td></tr>&quot;
endTable=&quot;</table>&quot;

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

'headline
newsName=&quot;Primedia Insight Newswire&quot;
News=replace(xml.transformNode(xsl),&quot;&#039;&quot;,&quot;&quot;)
News=replace(News,&quot;</br>&quot;,&quot;&quot;)
Response.Write(startTable&newsName&startTableEnd&News&endTable)

%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top