How to Parse Craigslist RSS Feeds in ColdFusion

The ColdFusion language includes a parser you can use to retrieve and display a Craigslist RSS feed. An RSS feed is an XML document that websites such as Craigslist use to allow aggregate sites to retrieve data in a standard format and use it for advertising, news and displaying the latest posts from a blog or website. Craigslist offers several feeds that you can use on your ColdFusion site.

Instructions

    • 1

      Open Adobe ColdFusion from the Windows program menu on your development desktop. Open your project, and double-click the file you want to use to parse the RSS feed.

    • 2

      Define the feed you want to parse. The following code uses the "Best of Craigslist" RSS feed:

      <cffeed source="http://www.craigslist.org/about/best/all/index.rss" query="content">

    • 3

      Parse the content, and display it on your site. ColdFusion includes libraries that parse the data for you. Add the following code to parse and display the RSS information:

      <cfdump var="#content#">

    • 4

      Save the file changes, and open the file in your browser to test the new code.

Related Searches:

References

Resources

Comments

Related Ads

Featured