SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Test RSS reader on localhost?

    Hi,

    I'm trying to implement an rss feed on my website. So far I've pieced togteher an ajax script from a few soiurces which I think will work, but I don't know how to test it as I'm quite new at RSS. Here's the script:

    HTML Code:
    <title>Ajax Rss Regurgitator</title>
    <script language="javascript" src="xhr.js"></script>
    <script language="javascript" src="rss_parse.js"></script>
    </head>
    <body>
    <p><b>RSS Regurgitator</b></p>
    <form id="frmRSSParse">
    
    <select id="lbfeeds" onChange="get_rss_feed();">
    	<option value="">SELECT A FEED</option>
    	<option value="thefirstfeed.com">RSS FEED</option>
    	<option value="thesecondfeed.com">New FEED</option>
    	<option value="thethirdfeed.com">Blogs</option>
    </select>
    
    &nbsp;
    <input id="cbDetails" type="checkbox" onClick='format_rss_data ("content", last_xml_response);' />
    show details
    </form>
    
    <div id="content">
    &nbsp;
    </div>
    
    </body>
    
    </html>
    and the rss feed

    HTML Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <rss version="2.0">
    
    <channel>
    
    <item>
    <title>The first feed title</title>
    <description>The Description is hereThe Description is hereThe Description is hereT
    </description>
    <link>http://localhost/thefirstfeed.com</link>
    </item>
    
    <item>
    <title>The second feed title</title>
    <description>The Description is here AJAX lemony fresh The Description is here 
    The Description is here AJAX lemony freshThe Description is here AJAX lemony fresh
    </description>
    <link>http://localhost/thesecondfeed.com</link>
    </item>
    
    <item>
    <title>The third feed title</title>
    <description>The Description is here, VERA vera VERA veraVERA veraVERA veraVERA vera
    </description>
    <link>http://localhost/thethirdfeed.com</link>
    </item>
    
    </channel>
    </rss>
    The problem is that I think I'm missing something. In the examples I've looked at the links to the feed in the first script are in formats such as: "thefirstfeed.rss.xml"

    Obviously I have no ".rss.xml" files for the script. Are these the 'actual' feeds or something. Can I simply create these files, or do I have to register my feed with some type of host or something like that? Like I said I'm new to RSS and and I could be totally missing something. Can I even create and test RSS on a 'localhost'? Any help would be appreciated and I can post the ajax xml parse script if that helps.

    Thanks

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,044
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    no xml files to test?

    XML files, like HTML files, are plain/text files with the extension .xml instead of .html
    I think if you set the path to it correctly you should be able to see something. Unless I'm missing what you're saying here.


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
  •