How to show XML data on web pages?

S

starfoxsb

Hi all.

I have a huge amount of data burnt on a CD-Rom (coming from a DB),
written on XML files.

I would like to show them to the user, by a web page.
In my first version, I build the Html page by picking data from XML
files and trasforming them by an XSL Transformation.

It works well, but as the data are quite a lot, it would be much
better to have them in different pages (besides the trasformation is
very slow).

I then tried to use Ajax.
My thought was to open the XML file and then build the different pages
with the right data range (es. 1 to 20 on the first page, 21 to 40 on
the second, and so on...) by a javascript function.

Unfortunately since my script is not running under a web server, when
I try to use the "open" method I get the error "Access is denied" (I'm
using IE 7)

XMLHttpReqObj = new ActiveXObject("Microsoft.XMLHTTP");
XMLHttpReqObj.open('GET', 'MyFile.xml', true);

Does anyone have any suggestion for solving the problem?
How could I arrange my data into different pages?

Thanks a lot for your help...
Bye!


Matteo
 
M

Martin Honnen

I have a huge amount of data burnt on a CD-Rom (coming from a DB),
written on XML files.

I would like to show them to the user, by a web page.
In my first version, I build the Html page by picking data from XML
files and trasforming them by an XSL Transformation.

Unfortunately since my script is not running under a web server, when
I try to use the "open" method I get the error "Access is denied" (I'm
using IE 7)

XMLHttpReqObj = new ActiveXObject("Microsoft.XMLHTTP");
XMLHttpReqObj.open('GET', 'MyFile.xml', true);

If IE can access the XML documents for an XSLT transformation then
access with Microsoft.XMLHTTP should work too. Or are you doing the XSLT
transformation outside of the browser?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top