Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,710
6,304
So I'm testing my app which needs to be able to parse websites. I set up a unit test for parsing a copy of MacRumors homepage and threw an NSXMLParser at it.

It stopped at line 49, column 8, complaining about how a meta tag hadn't been closed but the head tag outside of it was now being closed.

After a bit of investigating, I discovered that in html5, meta tags need not have a close to them.

So... I need suggestions. Is there a way I can make NSXMLParser handle this? Is there another parser for iOS which will handle this or should I just try rolling my own?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.