How do I parse an RSS feed?
I have a simple question regarding RSS feeds and XML. I have quite a bit of experience with XML, but no experience parsing RSS feeds. From what I understand, RSS typically uses XML to tr开发者_开发知识库ansfer data. If I could get well structured XML from the website that I want to parse, I would be good to go.
The problem is that when I click on the RSS link on the site, even though the URL ends with an XML file:
...l.com/resources/classifieds/rss_144.xml
When I click on it, the website contains content that isn't structured XML at all (this is what is viewable in the browser window):
Classifieds : Recreational Vehicles / Motorcycles, Road Bikes Used en-us http://www....l.com/index.php?nid=231&cat=144 ...L Classifieds : Recreational Vehicles / Motorcycles, Road Bikes Used $14,900.00 : 2007 Harley Davidson Fat Boy http://www....l.com/index.php?nid=218&ad=13841365&cat=144 Start the new year off right with a new Fat Boy! I am selling my 2007 Harley Davidson Fat Boy to make room for our new baby. not only do you get a b Fri, 31 Dec 2010 15:05:42 -0700 http://www....l.com/index.php?nid=218&ad=13841365&cat=144 $1,750.00 : 1985 Honda Goldwing GL1200 Aspencade Edition - Air Rid... http://www....l.com/index.php?nid=218&ad=13841353&cat=144 1985 Honda Goldwing GL 1200 Aspencade Edition - Air Ride - Motorcycle with LOW MILES.Check out this 1985 Honda Goldwing GL1200. ONLY 53,426 miles!!! Fri, 31 Dec 2010 14:45:04 -0700
But as I mentioned, the url suggests this file is an XML file. I want to be able to parse through this sites content, how do I get it in a way that in manipulatable? Like with structured brackets and such?
Is there some sort of parser I need to use or something?
Thanks!!
In some browsers, when you try to view an RSS feed, it only shows the text. Select View Source in your browser to see the actual XML.
精彩评论