Getting Rid of URLs While Parsing?

Discussion in 'iOS Programming' started by jpmcgrath, Jul 25, 2011.

  1. jpmcgrath macrumors newbie

    Jul 15, 2011
    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?
  2. RonC macrumors regular

    Oct 18, 2007
    Use NSXMLParser and implement the delegate methods. For every element in the XML feed, the appropriate delegate methods will be called.
  3. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    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.

Share This Page