Tiger: NSAttributedString from WebArchive
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