Re: Simplifying element creation

I would recommending benchmarking the JDOM and XDOM designs, and reading 
Elliotte Rusty Harold and Jason Hunter's writeups at
http://www.jdom.org/downloads/docs.html

The JDOM API is, aside perhaps from the very similar XDOM, the only 
rational imperative programming language API I've seen for XML.
It has excellent choices for operations and methods, and the 
builder-like compositional structure is close to some of Anne's proposal:

   new Element("foo")
          .setAttribute("a", "b")
          .addContent(new Element("bar").addContent("text"))

On the JSON and XML topic, in the Forms WG, we have shown a successful 
round trip of JSON web service data with an XForms processor.

In the XForms processor, JSON data looks like normal XML, but the 
parsing and serialization are done to JSON.  Arrays and keys with 
non-XML names are represented in a succinct way which leads both to 
correct operation and easy authoring with XPath.  These points are in 
draft form in http://www.w3.org/MarkUp/Forms/wiki/Json and there's also 
a paper on the topic from XML Prague 2011 by Alain Couthures 
http://www.xmlprague.cz/2011/sessions.html#JSON-for-XForms

Leigh.

Received on Thursday, 6 October 2011 02:15:41 UTC