On Wed, Jun 24, 2009 at 6:20 PM, Scott
Wilson<[email protected]> wrote:
> In practice, we've been serialising data into JSON and storing it in a
> preference as text content whenever we've needed a preference value to
> contain structured information.
>
> Having the content of the preference value as text content at least makes it
> easier to know how to start de/serializing it. Arbitrary structured XML/HTML
> would be a real pain to implement. Escaping XML or serialising preference
> values in some other fashion seems less painful.
>
I still don't see much difference between:
<preference name="foo">{'hello': 'value'}</preference>
Or
<preference name="foo"
value="
{'hello': 'value'}
">
But using (DOM3) textContent on this would be useless as information
is lost in the following case ('fasdfasd'):
<preference name="foo">
<hello>1234<olleh value="fasdfasd"/> 54321</hello>
</hello>
Kind regards,
Marcos
--
Marcos Caceres
http://datadriven.com.au