HighDots Forums  

How to show XML data on web pages?

Javascript JavaScript language (comp.lang.javascript)


Discuss How to show XML data on web pages? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
starfoxsb@gmail.com
 
Posts: n/a

Default How to show XML data on web pages? - 01-16-2008 , 11:12 AM






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

Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: How to show XML data on web pages? - 01-16-2008 , 11:37 AM






starfoxsb (AT) gmail (DOT) com wrote:

Quote:
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.

Quote:
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?


--

Martin Honnen
http://JavaScript.FAQTs.com/


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.