• 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: Tiger: NSAttributedString from WebArchive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiger: NSAttributedString from WebArchive


  • Subject: Re: Tiger: NSAttributedString from WebArchive
  • From: Nicko van Someren <email@hidden>
  • Date: Tue, 10 May 2005 16:03:01 +0100

On 9 May 2005, at 17:11, Pierre Bernard wrote:

Isn't this supposed to work?

...

    // Set up the options dictionary with desired parameters
    [options setObject:url forKey:NSBaseURLDocumentOption];

[attributedString readFromData:data options:options documentAttributes:&docAttrs];

...

In fact it takes minutes - like it is waiting on some network timeout.
Only to produce an empty string.


Have you tries adding:
[options setObject: NSWebArchiveTextDocumentType forKey: NSDocumentTypeDocumentAttribute]
so that it knows what sort of data it is supposed to unpack? I've not tried this but it might work.


Alternatively, the web archive format is just a binary plist so you could use NSDictionary +dictionaryWithContentsOfFile: to unpack the raw data and fetch the HTML as an NSData from the key WebMainResource, subkey WebResourceData.

    Nicko


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Tiger: NSAttributedString from WebArchive
      • From: Pierre Bernard <email@hidden>
References: 
 >Tiger: NSAttributedString from WebArchive (From: Pierre Bernard <email@hidden>)

  • Prev by Date: Re: Add metadata to my files for Spotlight
  • Next by Date: Re: Add metadata to my files for Spotlight
  • Previous by thread: Re: Tiger: NSAttributedString from WebArchive
  • Next by thread: Re: Tiger: NSAttributedString from WebArchive
  • Index(es):
    • Date
    • Thread