My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

XML Tool Overview

XMLTool is a very simple Java library to be able to do all sorts of common operations with an XML document. As a Java developer, I often end up writing the always the same code for processing XML, transforming, ... So i decided to put all in a very easy to use class using the Fluent Interface pattern to facilitate XML manipulations.

XMLTag tag = XMLDoc.newDocument(false)
    .addDefaultNamespace("http://www.w3.org/2002/06/xhtml2/")
    .addNamespace("wicket", "http://wicket.sourceforge.net/wicket-1.0")
    .addRoot("html")
    .addTag("wicket:border")
    .gotoRoot().addTag("head")
    .addNamespace("other", "http://other-ns.com")
    .gotoRoot().addTag("other:foo");
System.out.println(tag.toString());

Features

With XML Tool you will be able to quickly:

  • Create new XML documents from external sources or new document from scrash
  • Manage namespaces
  • Manipulating nodes (add, remove, rename)
  • Manipulating data (add, remove text or CDATA)
  • Navigate into the document with shortcuts and XPath (note: XPath supports namespaces)
  • Tranform an XMlDoc instance to a String or a Document
  • Validate your document against schemas
  • Executin callbacks on a hierarchy
  • Remove all namspaces (namespace ignoring)
  • ... and a lot of other features !

Download

You can download XML Tool versions:

<groupId>com.mycila.xmltool</groupId>
<artifactId>xmltool</artifactId>
<version>X.Y</version>

Manual

Please see Featured Wiki Pages (on the right) for more information. I strongly suggest you also checkout the source to see all the exemples in the unit tests, as you read the Manual.

Quick sample

Check the Manual for samples. You can also check in the Maven License Plugin project when we load the additional header definition file

Evolution - Participate !

If you think of useful methods to add, please post an issue so that we implement it.

Other interesting projects

Powered by Google Project Hosting