This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Timo Salmi: Another alternative is to store the data in XML format. This is a lot more complicated alternative because there are no ready tools available to parse arbitrary Java class. Or is there? Yes, there is a standard API for serializing Java objects into XML. However, this is not what you want either, because searches into the database are probably even more complicated (parsing XML is not trivial and fast, and it wastes space).

JanneJalkanen : I found an interesting link to Castor, a way to marshal/unmarshal Java Beans into XML. There's a good article explaining what Castor is at

PhilippeO : I rather prefer Dom4J, or JdoM for that.

TomZ: I have used both (JDOM and Castor XML) in some projects. I feel that these frameworks try to solve different problems:

Tries to provide direct access to an XML document in a more obvious
oo-like style. While...
Castor XML
is a framework for (un)marshalling Java objects to XML files.
For example, if you have an XML Schema, Castor will create for you all java classes you need. That was really amazing to me when I tested it first time. A tag like <my-tag> will become a class called MyTag with all methods you need to manipulate this class in a way that is consistant to what the schema says. When you got those classes you work with them as with normal java classes. Finally, you just marshall them back with just one call.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 04-May-2003 19:28 by TomZ.