StaxWax is a light-weight convenience framework for high-performance StAX XML writing and parsing.
View the Javadoc.
To read XML, instantiate an XmlReader from an InputStream.
XmlReader reader = XMLFactory.getXMLReader( inputStream );
reader.moveToStartElement( "dataValue" );
reader.getAttributeValue( "period" );
reader.getElementValue( "dataElement" );
To write XML, instantiate an XmlWriter from an OutputStream.
XmlWriter writer = XmlFactory.getXmlWriter( outputStream );
writer.openDocument();
writer.openElement( "dataValues" );
writer.writeAttribute( "period", period );
writer.writeElement( "dataElement", dataElement );
writer.closeElement();
writer.closeDocument();