Stephen M. McKamey, 2007-02-15

JsonML - Converting DOM to JsonML


The provided XML-to-JsonML XSLT is a transformation for converting XML or XHTML into JsonML. The provided JsonML UI Builder script is a script needed to convert JsonML into DOM elements. This is the deserialization of JsonML into DOM elements. So we have:


What would be interesting is the serialization of DOM back into JsonML. So a DOM-to-JsonML script would give us the following:

The true implications of this are as of yet untapped. It seems like the most interesting uses would involve sending the markup back to the server. Useful in a content management situation perhaps? Suggestions?

Nonetheless, in a moment of curiosity here an example: Convert to JsonML and back