Thursday, March 12, 2009

StaxMate 2.0: another Big Leap towards convenient, efficient xml processing

StaxMate 2.0.0 is now out, to augment your favorite Stax XML parser (like Woodstox or Aalto).
(for introduction to StaxMate, check out this tutorial).

Improvements for this release are focused in 3 main areas:

  • Convenient AND efficient access to typed content. With a little bit of help from a new version of Stax2 extension API (version 3.0), it is now possibly to efficiently read and write values of numeric (int, long, double), boolean and enumerated (Java enums) types.
    In future, more methods will be added to allow similar access to numeric arrays and base64-encoded binary content.
  • More convenience methods:
    • SMinputCursor.advance() to allow chaining, for example: int value = cursor.childElementCursor().advance().getElemIntValue()
    • SMInputCursor.asEvent() to construct XMLEvents for the current event.
    • Ability to pre-declare namespaces on output (using SMOutputElement.predeclareNamespace()) to minimize number of namespace declarations (not usually needed, sometimes is)
    • SMOutputElement.addElementWithCharacters() for a convenient short-cut.
  • Interoperability improvements:
    • DOMBuilder for building DOM documents out of XMLStreamReaders, and serializing DOM documents and elements using XMLStreamWriter.
    • StaxMate jar is now a fully functioning OSGi bundle

One reason for the major version bump is that this version requires implementation of Stax2 version 3.0, natively implemented by Woodstox and Aalto, and emulated for others (like Sjsxp) using Stax2 reference implementation. This version upgrade will offer wider range of functionality for future, and similar upgrade should not be needed in near future.

blog comments powered by Disqus

Sponsored By


Related Blogs

(by Author (topics))

Powered By

About me

  • I am known as Cowtowncoder
  • Contact me at@yahoo.com
Check my profile to learn more.