• 0.29.0

XML Parsing and Printing

Set of classes in com.jcabi.xml is an extra layer on top of DOM that allows simple parsing, printing, and transforming of XML documents and nodes:

public class Main {
  public static void main(String[] args) {
    XML xml = new XMLDocument(
      "<orders><order id="4">Coffee to go</order></orders>"
    String id = xml.xpath("//order/@id").get(0);
    String name = xml.xpath("//order[@id=4]/text()");

The only dependency you need is (you can also download jcabi-xml-0.29.0.jar and add it to the classpath):


Cutting Edge Version

If you want to use current version of the product, you can do it with this configuration in your pom.xml: