This project spawned from the attempt to simplify some complex XML datasets by representing one particular dimension of the data using simple tree structures that followed a consistent format.

One of the software I worked on had to deal with some quite complicated data structures in XML. The underlying schema was equally complex (the complexity was due to the large number of unorthogonal parameters) and unstable. But, we knew what data should be exposed to the user interface and that using tree would be a good way to navigate the dimensions.

So in order to develop some user interface components without being affected by the underlying changes in the schema, we designed a simple tree structure and a tool to extract the data and turn into a tree, minimising the impact of having to deal with an unstable schema.

Tree Model

The tree model simply defines the minimum amount of information needed to represent a tree.

The final output format can be anything depending on the requirements for the user interface. But we assumed that producing XML and an equivalent JSON format would be a good start as it is easy enough to produce decent Flash or HTML from either of these formats.

In a nutshell, the tree model assumes that:

  • a tree is list of nodes,
  • a node can point to a list of nodes,
  • a node has a name, a type and an identifier,
  • a node may need to be extended for other purposes.

It is intendedly a minimalistic format as we wanted to be able to use this as web services or using Ajax techiques.

The XML grammar for the tree is defined in this DTD.


The arborifier is the software bit that transforms data into the tree structure defined above.

I have written this as a Java library which takes XML as input and can produce a XML or JSON output. Unfortunately, I am lacking the time to document this properly, but the code is nonetheless available here and the javadoc there.