Re: NSXMLParser question
Re: NSXMLParser question
- Subject: Re: NSXMLParser question
- From: Kevin Ballard <email@hidden>
- Date: Thu, 21 Oct 2004 06:41:36 -0400
Yes, not all RSS feeds are well-formed XML. These feeds aren't correct,
but if you want to be able to parse them you can't use NSXMLParser
(since a real XML parser won't parse a non-well-formed feed).
Given that, why are you writing your own RSS parser at all? Brent
Simmons has posted open-source code to an RSS parser using
CoreFoundation routines. You can find it at
<
http://ranchero.com/cocoa/rss/>. Note that I haven't looked at it, I'm
just assuming it's decent since he's the author of NetNewsWire (and
NetNewsWire 2 rocks)
On Oct 21, 2004, at 6:17 AM, Jesus De Meyer wrote:
For test purposes I wanted to check out the NSXMLParser object to read
RSS feeds. Now, I've found that some sites do not parse at all.
For example: http://slashdot.org/index.rss doesn't parse, but changing
that to http://www.slashdot.org/index.rss (notice the www) does. Is
there a method in Cocoa that will automatically change the URL from
one format to the other?
Another site is http://www.insidemacgames.com/news/rss.php A closer
look to the code shows that the code has a <![CDATA[ tag, which is
probably why the parser doesn't parse.
I've seen that NSXMLParser does have delegate methods to handle this,
but I have no idea how to use them. Can anybody here help me on this
issue, perhaps with some sample code?
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden