Java XML: Woodstox Introduction

Overview

Woodstox
is a very powerful toolkit for XML processing.Its main features are as follows:

  • Namespace aware StAX (Streaming API for XML) compliant (JSR-173) processor
  • Support for DTD, RelaxNG and W3C Validations
  • Support for both XML parsing and XML creation
  • SAX (Simple API for XML) parsing and validation
  • High performance processor with excellant error handling support

Woodstox StAX based implementation is ‘Pull Parser’ which loads the chunks of XML for processing instead of loading the entire document. Hence it is very efficient for processing of high volume XML.

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

Before trying out the sample programs, see
Understanding Steps in Loading of Woodstox classes

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 Woodstox:

StAX (Streaming API for XML) Parsing

StAX XML Generation

XML Validation

Exception Handling

Woodstox Configuration

SAX (Simple API for XML)

Libraries used to run the sample programs

  • msv-core-2010.2.jar
  • org.osgi.core-4.2.0.jar
  • stax2-api-3.1.1.jar
  • woodstox-core-asl-4.2.0.jar
  • woodstox-core-lgpl-4.2.0.jar
  • woodstox-msv-rng-datatype-20020414.jar
  • xsdlib-2010.1.jar

Leave a Comment