Getting Rid of URLs While Parsing?

Discussion in 'iPhone/iPad Programming' started by jpmcgrath, Jul 25, 2011.

  1. macrumors newbie

    #1
    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. macrumors regular

    #2
    Use NSXMLParser and implement the delegate methods. For every element in the XML feed, the appropriate delegate methods will be called.
     
  3. Moderator

    dejo

    Staff Member

    #3
    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