Forum Moderators: open

Message Too Old, No Replies

including xml file in asp page

how to do it

         

HelenDev

1:43 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does anyone have any experience of this?

Someone has written some code for me which consists of:

the xml file
the xml stylesheet
an html file with some javascript which loads it all up, does something with ActiveX and makes it work

The problem with this is that it works whilst sitting on my pc, but as soon as I put it on a server, I just get a blank page. Can anyone shed any light on this?

Thanks,
Helen.

Xmlx

7:44 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



Hi Helen,

Do you have Script Debugging available (MSIE?).

If the XSLT is driven by JavaScript, then you should be seeing an error. Try and get Debugging working.

In the meantime, when this sort of thing happens to me, it is usually something to do with changes to filepath references in the code.

Hope this helps....

Xoc

12:02 am on Nov 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This page [xoc.net] shows exactly the code you need on the server side. The web server needs to have the msxml parser installed for it work.

syber

2:21 pm on Nov 12, 2004 (gmt 0)

10+ Year Member



This is the code I use for displaying RSS feeds:

sourceFile = "http://www.example.com/rss.xml"
styleFile = Server.MapPath("newsfeed.xsl")

Set xmlhttp = Server.CreateObject("MSXML2.SERVERXMLHTTP")
xmlhttp.Open "GET", sourceFile, false
xmlhttp.Send

set source = Server.CreateObject("MSXML2.DOMDocument")
source.async = false
source.loadxml(xmlhttp.ResponseText)

set style = Server.CreateObject("MSXML2.DOMDocument")
style.async = false
style.load(styleFile)

Response.Write source.transformNode(style)

Art

HelenDev

5:24 pm on Nov 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for all your suggestions guys :)