How to show XML data on web pages?

Discussion in 'Javascript' started by starfoxsb@gmail.com, Jan 16, 2008.

  1. Guest

    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
     
    , Jan 16, 2008
    #1
    1. Advertising

  2. wrote:

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


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 16, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Replies:
    5
    Views:
    1,018
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  2. Replies:
    4
    Views:
    319
    Bruno Desthuilliers
    Mar 3, 2007
  3. Replies:
    4
    Views:
    639
    Sam Hobbs
    Feb 24, 2008
  4. Nathan Sokalski
    Replies:
    4
    Views:
    294
    Nathan Sokalski
    Dec 21, 2006
  5. Nathan Sokalski
    Replies:
    4
    Views:
    333
    Nathan Sokalski
    Dec 21, 2006
Loading...

Share This Page