Tuesday, March 4, 2008

JOX: Java Objects in XML

I've been working on a Java Swing prototype and today I researched about using XML as data storage for temporary persistence of data.

I came across JOX, or Java Objects in XML which uses serialization to transfer data between documents and Java Beans. A rather old open source library, I used it in place of SAX and DOM parsers to minimize effort in the parsing of data. One issue that I've encountered is the Unsupported date format exception during loading of java.util.Date fields. I thought maybe the library don't support all Locales. I had to use a temporary string variable to store the date in String format before converting them to Date class.

There's got to be some other way to save application state for Swing applications. Hmm..

---
References: http://www.wutka.com/jox.html