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

Tiger: NSAttributedString from WebArchive


  • Subject: Tiger: NSAttributedString from WebArchive
  • From: Pierre Bernard <email@hidden>
  • Date: Mon, 9 May 2005 18:11:37 +0200

Hi!

Isn't this supposed to work?

NSData* data = [webArchive data];
NSDictionary* docAttrs = nil;
NSMutableDictionary *options = [NSMutableDictionary dictionary];
NSURL *url = [NSURL fileURLWithPath:[dataFolder stringByAppendingPathComponent:@"dummy.webarchive"]];
NSTextStorage* attributedString = [[NSTextStorage alloc] init];


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

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

    NSLog(@"attributedString = %@", attributedString);

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

BTW, what I am trying to do is to get plain text from a web archive to feed to Spotlight.

TIA,
Pierre
_______________________________________________
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: Nicko van Someren <email@hidden>
    • Re: Tiger: NSAttributedString from WebArchive
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: multiple inheritance equivalent in Core Data?
  • Next by Date: Re: Help not working using key equivalent
  • Previous by thread: NSWindow styleMask modification
  • Next by thread: Re: Tiger: NSAttributedString from WebArchive
  • Index(es):
    • Date
    • Thread