Getting Rid of URLs While Parsing?

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

  1. macrumors newbie

    Joined:
    Jul 15, 2011
    #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

    Joined:
    Oct 18, 2007
    Location:
    Chicago-area
    #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

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #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