I have a small test app that parses a few RSS feeds.
It all goes well for all except for one.
I scanned through the feed’s XML and noticed that it fails once it reached a tag that has “&” in it. So, if I have a tag like this:
<like>beer & barbeque</like>
The log says that it found a string
beer
And it crashes with the exception
Error Domain=NSXMLParserErrorDomain Code=68 "Operation could not be completed. (NSXMLParserErrorDomain error 68.)
The most annoying thing is that I don’t even need the data from the problematic tag.
Any idea how I can work around this?
Since the feed is already failing… do a string replace on ‘
&<space>‘ to ‘&‘ while you fight it out with the feed publisher to clean up his act.The feed must be valid XML. Period.