Java XML: Aalto Introduction

Overview

Aalto
is a toolkit for XML processing. It supports the following features:

  1. Namespace aware StAX (Streaming API for XML) compliant (JSR-173) processor
  2. Support for both XML parsing and XML creation
  3. SAX (Simple API for XML) parsing
  4. High performance processor with excellant error handling support

In particular, the main differentiator of Aalto in comparison with other StAX compliant parsers are:

  1. Speed of Parsing: Aalto is the fastest java based XML parser available as of date for StAX and SAX based parsing. See jvm-serializers site and this comparative report for further details.
    Hence if parsing speed is critical for your project, then Aalto parser can be a good choice.
  2. Non-blocking Asynchronous Parsing: It allows the capability to feed more XML data chunks and incrementally generate more XML events without forcing the current thread to block on I/O read operation

For more details see
Aalto’s Home Page

Diagrammatic representation of StAX API
provides an overview of key abstractions.

The list of jars required to run the sample programs below is listed
here

Sample Programs

The following is a list of sample programs to showcase the various features of Aalto:

StAX (Streaming API for XML) Parsing

Asynchronous StAX Parsing

StAX XML Generation

SAX (Simple API for XML) Parsing

Aalto Configuration

Libraries used to run the sample programs

  • aalto-xml-0.9.6.jar
  • stax-api-1.0.1.jar
  • stax2-api-3.1.1.jar

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Bitnami