Re: Stripping HTML tags
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.