• 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
HTML Followup - NSData problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTML Followup - NSData problem


  • Subject: HTML Followup - NSData problem
  • From: "Chris Backas" <email@hidden>
  • Date: Tue, 25 Sep 2001 22:49:05 -0400 (EDT)
  • Priority: Normal

Hello,

I'm trying to display basic HTML content (nothing major or fancy) in an NSTextView, in much the way Mail.app appears to do.

Thanks to a user on this list, I was directed to the NSAttributedString class, which appears to be able to parse HTML content in one of its constructors - it takes 3 arguments:
an NSData Object, a URL, and an NSMutableDictionary which it uses to return attributes. I'm having a problem with NSData though. It appears that it's supposed to simply encapsulate a 'blob' of data, but when I
create it and pass the HTML text I wish to encapsulate, it throws a NSParseErrorException, complaining that the tag html is unknown on line two.

So, two questions:
1) Why is NSData attempting to parse the HTML? The documentation doesn't indicate that it would do this
2) Why the heck would any HTML parser not understand the <html> tag??

Thanks for any help,
Chris Backas


  • Prev by Date: Re: Problem with fonts/traits in attributed strings
  • Next by Date: Re: Problem with fonts/traits in attributed strings
  • Previous by thread: Re: Problem with fonts/traits in attributed strings
  • Next by thread: Adding custom inputs to NSRunLoop
  • Index(es):
    • Date
    • Thread