
Description
Changing one XML file in Java with the plain DOM API means building a factory, fetching node lists, casting types and looping by hand, and eight lines out of ten are boilerplate. Anyone who has written jQuery can only look at it with nostalgia: a selector and an append would have done the job. jOOX brings that feel to Java by wrapping W3C DOM in a jQuery style fluent API, so you select nodes, change content and add children in one chain.
It is not a separate XML library. Underneath is still the standard org.w3c.dom, so the nodes you get can be handed to any other DOM code and you can adopt it just where it helps. The design draws on jRTF, jQuery and jOOQ, and it needs Java 8 or later. The download is the 2.0.2 release archive: unpack it and add the jar to your project.
Chained selection and traversal: pick nodes by tag, attribute or XPath in a jQuery-like way, then filter the result and walk to parents, children and siblings
Edit the document directly: set text and attributes, append or replace children and remove elements without hand-written createElement and appendChild calls
Built on standard DOM: objects are plain W3C DOM, so they pass freely to other DOM code and you are never locked into a private data structure
XPath support: pass an XPath expression when you need precise targeting and skip the XPathFactory setup
Functional style: use Java 8 lambdas on the selected nodes, which makes transforming and extracting data shorter than a loop
Open source: released under Apache License 2.0 with source and Javadoc on GitHub
It is not a separate XML library. Underneath is still the standard org.w3c.dom, so the nodes you get can be handed to any other DOM code and you can adopt it just where it helps. The design draws on jRTF, jQuery and jOOQ, and it needs Java 8 or later. The download is the 2.0.2 release archive: unpack it and add the jar to your project.
Features
Chained selection and traversal: pick nodes by tag, attribute or XPath in a jQuery-like way, then filter the result and walk to parents, children and siblings
Edit the document directly: set text and attributes, append or replace children and remove elements without hand-written createElement and appendChild calls
Built on standard DOM: objects are plain W3C DOM, so they pass freely to other DOM code and you are never locked into a private data structure
XPath support: pass an XPath expression when you need precise targeting and skip the XPathFactory setup
Functional style: use Java 8 lambdas on the selected nodes, which makes transforming and extracting data shorter than a loop
Open source: released under Apache License 2.0 with source and Javadoc on GitHub
