views:

347

answers:

5

Following Izb's question about Best binary XML format for JavaME, I'm looking for an implementation for either binary XML-like formats or just plain XML. My metrics for such implementation, by most important first, are:

  1. Supported phones. A basic JTWI phone should be able to run it.
  2. It should be either verified or open source, so I could have it verified.
  3. Small memory footprint.
  4. Fast.
  5. Easy to use on server side.

Thanks,
Asaf.

A: 

The W3C defined a binary encoding for XML, it's called Fast InfoSet, but it's optimised for high-volume web services, rather than embedded devices, and I don't think there are any light and fast implementations suitable for you.

If you want to stick with plain XML, and you need a DOM implementation, then go with XOM (http://xom.nu). It's easily the DOM with the smallest footprint, and it's very fast.

But if you really need to reduce your footprint, then you need to use a non-DOM API like SAX or STAX, but that's considerably more work.

skaffman
+1  A: 

Hi

You could use NanoXML for J2ME. It works well and I've never had any problems with it in a production environment. Please note that it is non validating.

IanG

+2  A: 

Take a look at kXML - http://kxml.objectweb.org/. It supports WBXML and has a low memory footprint, but its not very strict on errors.

Abhaya
A: 

Thanks to all those who answered, but this is what I eventually did -

There's a good document about Parsing XML in J2ME here. There's a table there with some alternatives. For now I opted to go for ASXMLP and use it for xml-push parsing.

Asaf R
+1  A: 

The W3C conducted an extensive and open analysis of binary XML technologies, including 9 months of benchmarking to determine which where the smallest, fastest and best for their use cases and requirements [1]. Based on this anaysis, they selected one format to be the single standard for the web [2].

The technology they selected is called "Efficient XML", not FastInfoset as was reported by another commenter. The W3C found FastInfoset did not achieve sufficient levels of compactness and generality for their use cases. You can find a short description of this decision on thee W3C's public mailing lists at http://lists.w3.org/Archives/Public/public-exi/2009Dec/0001.html. You can find low-footprint, fast implementations of the W3C EXI standard for mobile devices and server platforms from http://www.agiledelta.com/product_efxsdk.html.

 Hope this is helpful!,

 John

[1] http://www.w3.org/TR/exi-measurements/

[2] http://www.w3.org/TR/exi-evaluation/

John Schneider