[Tutor] More and more OT - Python/Java

Kent Johnson kent37 at tds.net
Thu Jan 13 01:03:59 CET 2005


Liam Clarke wrote:
> Out of curiousity, having poked around XML while learning about the
> JScript DOM, what are you using it for?

Lots...one project I worked on, we used XML as the native file format and dom4j trees as the object 
model. In other words, when you saved a document, you got an XML file; when you read a document, it 
was stored internally as a dom4j tree. (The program was written in Jython so it used Java libraries.)

The project was basically a domain-specific editor. Using XML and dom4j worked out great. One thing 
I really like is that when the domain model is a dom model, you can use XPath as a query language on 
your model. Big chunks of the application were data-driven and most of the data tables used XPath to 
describe the piece of the model they needed.

I have written quite a bit about this project on my blog - start at www.kentsjohnson.com and look 
for blog entries and essays about dom4j, xpath and Meccano (the name of the project).

Another project I worked on had to manipulate a tree structure stored in a database. I built a dom4j 
tree in memory to represent the database tree and did my analysis on that. Very handy.

Kent


More information about the Tutor mailing list