• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Remove HTML Tags
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove HTML Tags


  • Subject: Re: Remove HTML Tags
  • From: Rob Keniger <email@hidden>
  • Date: Mon, 24 Nov 2008 20:02:55 +1000


On 24/11/2008, at 6:54 PM, Jean-Daniel Dupas wrote:

Hello, what's the best way to remove html tags and javascript from a NSString?
(I'm working on a web crawler and I'm needing a way to get the contents of a page that doesn't have a description on it.)


Thanks,
Mr. Gecko

Just a suggestion: loading it in a WebView and retreiving the page text content.


Or you can use one of the various -initWithHTML methods of NSAttributedString and then just ask for the -string value.

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Remove HTML Tags
      • From: Douglas Davidson <email@hidden>
References: 
 >Remove HTML Tags (From: "Mr. Gecko" <email@hidden>)
 >Re: Remove HTML Tags (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: NSXMLElement -stringValue and whitepsace
  • Next by Date: Re: Need some advice on multithreading
  • Previous by thread: Re: Remove HTML Tags
  • Next by thread: Re: Remove HTML Tags
  • Index(es):
    • Date
    • Thread