[whatwg] Requesting JSON.toXML
Tab Atkins Jr.
jackalmage at gmail.com
Fri Sep 30 14:23:49 PDT 2011
On Fri, Sep 30, 2011 at 2:19 PM, Charles Pritchard <chuck at jumis.com> wrote:
> Now that DOM4 includes DOMString as an argument type for Node methods, I'd like to have a clear and easy path to serialize a JSON object into an XML DOMString.
>
> It's not a trivial task. Any takers?
>
> Example:
>
> JSON.toXML({div:'Hello world'});
I'm curious why you would want such a thing. You can store DOM trees
as strings and revive them when used. You can transmit DOM across XHR
either as a string or, soon, directly as a document.
I don't see a reason to store DOM into an alternative JSON structure.
~TJ
More information about the whatwg
mailing list