Skip to content

Releases: jcabi/jcabi-xml

XSL and XSLDocument

31 Oct 18:29
Compare
Choose a tag to compare

A new class and a new interface added in this version, XSLDocument and XSL respectfully. Transformation of XML is as easy as this:

XML first = new XMLDocument("<hello/>");
XML second = new XSLDocument(xsl).transform(first);

Conditional printing of documents and nodes

29 Oct 06:25
Compare
Choose a tag to compare

This version prints documents and nodes differently. For example:

XML xml = new XMLDocument("<root><name>John</name></root>");
System.out.println(xml);

will output:

<?xml version="1.1"?>
<root><name>John</name></root>

While this code:

XML xml = new XMLDocument("<root><name>John</name></root>");
System.out.println(xml.nodes("/root").get(0));

will output (mind the absence of XML declaration):

<root><name>John</name></root>

First stable version

29 Oct 06:01
Compare
Choose a tag to compare

First stable version that enables parsing and printing of XML documents:

XML xml = new XMLDocument("<hello><foo>hey</foo></hello>");
System.out.println(xml.nodes("/hello/foo").get(0));

will output:

<foo>hey</foo>