Re: [widgets] [preference element] question on the value attribute

On Wed, Jun 24, 2009 at 6:20 PM, Scott
Wilson<scott.bradley.wilson@gmail.com> 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

Received on Wednesday, 24 June 2009 17:00:09 UTC