Switch branches/tags
Nothing to show
Clone or download
Latest commit a2333b4 Mar 27, 2018
Failed to load latest commit information.

commons-xml build status maven central

A Java library for easy XML processing.

This software is part of the Shredzone Commons.


  • Lightweight, very simple and comprehensible API
  • No bells and whistles, no namespaces, no validation, just plain XML parsing
  • Use XPath expressions for selecting the XML parts you want to read
  • Use streaming API and lambda expressions to process the XML data

Quick Start

A very simple use case is reading text from a configuration file. This is the XML file to be read:


This is the program code:

XQuery xq = XQuery.parse(new FileReader("config.xml"));
String foo1 = xq.text("/config/foo1"); // Hello
String foo2 = xq.text("/config/foo2"); // World

That's all!

But commons-xml offers a lot more possibilities. Just see the online documentation for more examples.



commons-xml is open source software. The source code is distributed under the terms of GNU Lesser General Public License Version 3.