SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    turning an XML into a string

    Hi,

    How can I use JS to turn the XML of an RSS into one big string.

    The reason is because I want to use this JS:

    http://www.captain.at/howto-ajax-parse-rss.php

    and some DOM parsing to get an RSS feed onto my website.

    Please point me in the right direction. Thanks!

    Note: the RSS is at another location, so using XMLhttpRequest doesn't work.

    I figure all I am doing is getting the plain text of an RSS feed, so this should not be that hard.

    Thanks in Advance!

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Note: the RSS is at another location, so using XMLhttpRequest doesn't work.
    What server side language do you plan to use to get the rss feed? If you use php, you would do something like this:

    mypage.php
    PHP Code:
    <script type="text/javascript">

    <?php

    $str 
    /*get rss feed data somehow*/;

    echo(
    "var rssStr = $str");

    ?>

    alert(rssStr);

    </script>

  3. #3
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •