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

jpmcgrath

macrumors newbie
Original poster
Jul 15, 2011
8
0
I'm parsing an XML feed that is full of HTML elements (e.g. <em></em>, etc.) but I do not want those to show up in my application as plain text. Is there a way to get rid of them?
 
I'm parsing an XML feed that is full of HTML elements (e.g. <em></em>, etc.) but I do not want those to show up in my application as plain text. Is there a way to get rid of them?

Use NSXMLParser and implement the delegate methods. For every element in the XML feed, the appropriate delegate methods will be called.
 
First, I don't think you meant to say URLs in your thread title. URLs and HTML tags are very different things.

Second, you might also want to consider simply passing your HTML string through a regular expression to remove all the HTML tags. I suspect you may even find some pre-existing solutions (i.e. patterns) out there on the internet.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.