Skip to content

dhis2/staxwax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StaxWax

StaxWax is a light-weight convenience framework for high-performance StAX XML writing and parsing.

View the Javadoc.

Reading XML

To read XML, instantiate an XmlReader from an InputStream.

XmlReader reader = XMLFactory.getXMLReader( inputStream );
reader.moveToStartElement( "dataValue" );
reader.getAttributeValue( "period" );
reader.getElementValue( "dataElement" );

Writing XML

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();

About

Library for convenient StAX XML parsing.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages