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

Re: HTML to NSString


  • Subject: Re: HTML to NSString
  • From: Mark Munz <email@hidden>
  • Date: Wed, 2 Jun 2004 18:11:58 -0600

From my experience, you won't get what you'd expect -except in maybe some of the much simpler cases. I've tried this approach with some more complicated HTML files and while the displayed results show the basic content, when you call [myAttribString string], you won't get the results you expect.

I've wondered if something in WebKit will make it easier to scrape an HTML file.

Mark

On Jun 2, 2004, at 1:10 PM, Steve Sims wrote:

On 2 Jun 2004, at 14:21, Mark Bennett wrote:

I have a situation where I need to read an HTML file and somehow convert it to a NSString.

I know that the NSAttributedString class can be used to read and parse the HTML, but it appears to only export its data as RTF.

If I know that the data can be represented as Unicode (i.e., there are no graphics or attachments), is there a way to create a NSString with it?

Erm,... NSAttributedString has the method "string" which returns a pointer to an NSString...

I suspect you may have been looking at just the documentation for the Cocoa NSAttributedString Additions.

Steve
_______________________________________________
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.
_______________________________________________
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.


References: 
 >HTML to NSString (From: Mark Bennett <email@hidden>)
 >Re: HTML to NSString (From: Steve Sims <email@hidden>)

  • Prev by Date: Re: SEL and NSDictionary
  • Next by Date: Re: Objective-C++ newbie questions
  • Previous by thread: Re: HTML to NSString
  • Next by thread: interface design question
  • Index(es):
    • Date
    • Thread