Jump to content

Talk:Web Archive (file format)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 123.193.138.96 (talk) at 00:05, 4 July 2011 (Not even wrong: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputing Stub‑class
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StubThis article has been rated as Stub-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
Note icon
This article has been automatically rated by a bot or other tool as Stub-class because it uses a stub template. Please ensure the assessment is correct before removing the |auto= parameter.
WikiProject iconApple Inc. Stub‑class
WikiProject iconThis article is within the scope of WikiProject Apple Inc., a collaborative effort to improve the coverage of Apple, Mac, iOS and related topics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StubThis article has been rated as Stub-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
Note icon
This article has been automatically rated by a bot or other tool as Stub-class because it uses a stub template. Please ensure the assessment is correct before removing the |auto= parameter.

Untitled

The introductory statement does not contain the statement "totally sucks" which needs to be added. For verification, try sending one a friend or coworker. —Preceding unsigned comment added by 155.247.231.155 (talk) 20:59, 9 March 2010 (UTC)[reply]

Not even wrong

Webarchives 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.

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/SerializePlist/SerializePlist.html

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.wikipedia.org/wiki/Apple_Developer_Tools#Property_List_Editor

It's not rocket science.