Woodstox : Configuring Woodstox For High Speed

Overview

Woodstox provides various configuration options for efficient performance based on environment constraints. In this article, we shall see how to configure Woodstox for speed assuming that memory is not a significant constraint.

Create employee.xml as shown below.

Create TestConfigurationForSpeed class as shown below.

The configuration for speed is defined using
XMLInputFactory2.configureForSpeed()
(see line 19 below). This shall optimize Woodstox parser so that the time taken to complete the parsing is minimized.

The output of the program is as shown below:

Download Source Code for this Program



Previous
Next

<%@include file="/bottom.jsp"%>

Leave a Comment