SXC 0.5 Release - XML compiler, JAXB runtime, Streaming XPath, Drools, and more
[ dandiep ] 16:06, Monday, 19 March 2007

SXC, or simple XML compiler, generates optimized XML parser/writers for your project. The core of SXC is an API which allows you to declaritively say what type of XML you’re expecting to be parsing or writing. You can then attach actions to perform when you encounter/write that xml. For instance, you can say you're expecting the “customer” element and you want to do “new Customer()” when I get there. It will then compile an optimized XML parser for you.

SXC includes 3 frontends in addition to its core APIs:

  • JAXB: SXC uses the JAXB annotations to drive compilation of an optimized parser/writer for you at runtime. This runtime is approximately 2-3x faster on the reading side, and about 20-90% faster on the writing side of things.We do not claim JAXB compliance yet, but we support most common JAXB functionality. It has been tested with both CXF and XFire.
  • XPath: SXC can compile down XPath expressions and build an optimized streaming XPath parser for them. Through an XPath event API, you can listen for multiple events as you scan a document. Currently only support a limited subset of XPath expressions is supported.
  • Drools: SXC also includes support for tying in SXC's efficient XPath event API into Drools. One of the things this makes possible is a very efficient XPath based message router. Rules will fire as your XPath criteria are met and you can take action.

For more information see the SXC website, user's guide, or the project announcement.