A jOOX First-Time Experience Article


Here’s some nice first-time user experience about jOOX, my lesser-known product:
http://www.kubrynski.com/2013/03/as-developer-i-want-to-use-xml.html

As a reminder, here’s what jOOX is all about:

jOOX stands for Java Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, to allow for fluent XML document creation and manipulation where DOM is required but too verbose. jOOX only wraps the underlying document and can be used to enhance DOM, not as an alternative.

Unlike other, similar tools that mimick jQuery (e.g. jsoup, jerry, gwtquery), jOOX really aims to leverage standard w3c DOM usage, which isn’t such a bad thing after all, with its performant, standard Xerces implementation.

Some simple example code:

// Find the order at index 4 and 
// add an element "paid"
$(document).find("orders")
           .children().eq(4)
           .append("<paid>true</paid>");

// Find those orders that are paid 
// and flag them as "settled"
$(document).find("orders")
           .children().find("paid")
           .after("<settled>true</settled>");

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s