This article is rated Stub-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||
|
Not even wrong
editWebarchives are simply ObjC plist representations of the web DOM that happens to include the embedded binary files.
It's NSKeyedArchiver, not NSKeyedEncoder (maybe older versions of ObjC). But that doesn't really matter much. You can extract to a plist with NSPropertyListSerialization from an NSData image of the NSBundle file (the web archive itself).
You can find ~10 line ObjC code snippet ("Restoring a property list (Objective-C)") to build a property list for a web archive in the Apple "Property List Programming Guide" under "Serializing a Property List". Just change the BSBundle:pathForResource:ofType type from "plist" to "webarchive" and feed it the file in place of @"Data" - it's coded for a "Data.plist" file. Then you have a property list that resembles an XML DOM except that it's accessed through dictionaries and arrays instead of XML API or XPATH calls.
You can also load a WebArchive into the developer tool shipped Property List Editor application to understand the webarchive plist structure without writing any code.
http://en.wiki.x.io/wiki/Apple_Developer_Tools#Property_List_Editor
It's not rocket science. — Preceding unsigned comment added by 123.193.138.96 (talk) 00:05, 4 July 2011 (UTC)