Skip to content


Added NSCoding support #2

merged 0 commits into from

2 participants


No description provided.


Keeping the original data around is definitely a clever way to accomplish NSCoding support with little code. But I don't like keeping it around for the lifetime of the document, it seems inelegant, and a not-insignificant amount of memory baggage.

I do see how making SMXMLElement properly implement NSCoding would add a lot of annoying boilerplate code though. So I'm torn.

Perhaps -description could take an option not to truncate the node values? Then the document could be encoded as a single string, and later decoded by reparsing.


With the current implementation, namespaces are lost. By keeping the data instead of a reconstructed xml, we can keep information about namespaces that could be later read if namespace support is added to SMXMLDocument.


If namespaces were supported, wouldn't they make it into the -description output as well?

@0xced 0xced merged commit a42868e into nfarina:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 0 additions and 0 deletions.
Something went wrong with that request. Please try again.