Inserting XML into a webpage.

Discussion in 'XML' started by james.qian@gmail.com, May 10, 2006.

  1. Guest

    Hi, and thanks in advance for helping me out.

    I have an XML file, with an XSL style sheet attached, and I want to use
    this XML file as a news feed on my personal site, instead of using PHP.

    Is there any way to insert this XML file into the body of my site
    without using iframes or using DOM to parse it? I was trying to use
    DOM to load it and display it as is, but being a noob at this, I
    totally screwed up.

    Maybe load it and appendChild?

    If GooglePages allows hotlinking, here is a link to the file (i
    disallowed hotlinking on my own site, so i had to upload it here):
    http://james.qian.googlepages.com/news.xml
    , May 10, 2006
    #1
    1. Advertising

  2. wrote:

    > I have an XML file, with an XSL style sheet attached, and I want to use
    > this XML file as a news feed on my personal site, instead of using PHP.
    >
    > Is there any way to insert this XML file into the body of my site
    > without using iframes or using DOM to parse it?


    Most server side languages can do this, those available to you depend on
    your webserver.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, May 11, 2006
    #2
    1. Advertising

  3. Andy Dingley Guest

    wrote:

    > I have an XML file, with an XSL style sheet attached, and I want to use
    > this XML file as a news feed on my personal site, instead of using PHP.


    Do it server-side with PHP.

    You could do it client-side instead. But this is no easier to code, and
    it's getting to be browser-dependent. Server-side is simpler to deploy.
    If you really want to do this client-side though, look into AJAX.
    Andy Dingley, May 11, 2006
    #3
  4. wrote:
    > Maybe load it and appendChild?


    Load, importNode (may be needed to get the new data into objects
    compatable with the ones you want to add it to), and append or insert as
    appropriate.
    Joe Kesselman, May 11, 2006
    #4
  5. Guest

    Thanks, Joe, I'll try that.
    , May 12, 2006
    #5
    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. mark
    Replies:
    2
    Views:
    285
  2. Replies:
    1
    Views:
    419
  3. Paul
    Replies:
    14
    Views:
    841
    Alexey Smirnov
    Jun 19, 2008
  4. sifar
    Replies:
    5
    Views:
    413
  5. soren625
    Replies:
    2
    Views:
    371
    soren625
    Dec 12, 2006
Loading...

Share This Page