• 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: Stripping HTML tags
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stripping HTML tags


  • Subject: Re: Stripping HTML tags
  • From: Sherm Pendley <email@hidden>
  • Date: Wed, 12 Mar 2003 22:16:42 -0500

On Wednesday, March 12, 2003, at 07:13 PM, sinclair44 wrote:

I have a NSString that contains several HTML tags. I don't care at all about
these tags, and would like to get rid of them. Is there a fairly easy way to
do so? I haven't found one...

(I don't care *at all* what these tags are; I just want the text.)

You might try creating an NSAttributedString with the HTML (-initWithHTML:documentAttributes:), and then use the string: method to get a plain string out of it.

sherm--

"But i don't want to go among mad people," Alice remarked.
"Oh, you can't help that," said the Cat: "we're all mad here. I'm mad, You're mad."
"How do you know I'm mad?" said Alice.
"You must be," said the Cat, "or you wouldn't have come here."
"Alice in Wonderland" - Lewis Carrol
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Stripping HTML tags
      • From: sinclair44 <email@hidden>
    • Re: Stripping HTML tags
      • From: Hasan Diwan <email@hidden>
References: 
 >Stripping HTML tags (From: sinclair44 <email@hidden>)

  • Prev by Date: REPOST: Problem taking scale into account while printing
  • Next by Date: Converting Window coord to View coord
  • Previous by thread: Stripping HTML tags
  • Next by thread: Re: Stripping HTML tags
  • Index(es):
    • Date
    • Thread