[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|http://castor.exolab.org/], a way to marshal/unmarshal [Java Bean]s into [XML].  There's a good article explaining what Castor is at [onjava.com|http://www.onjava.com/pub/a/onjava/2001/10/24/xmldatabind.html]

[PhilippeO] : I rather prefer [Dom4J|http://www.dom4j.org/], or [JDOM|http://www.jdom.org] for that.

[TomZ]: I have used both ([JDOM|http://www.jdom.org] and Castor XML) in some projects. I feel that
these frameworks try to solve different problems:

;JDOM: 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 consistent with 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.

[DuncanMcGregor] has just been using [XStream|http://xstream.codehaus.org/], and finds it great for unsophisticated read and write object graphs.


YishayMor: In [our notes|http://www.weblabs.eu.com/wr/users/Yishay/webreports/notes/index.jsp] prototype uses [java.beans.XMLDecoder |http://java.sun.com/j2se/1.4.2/docs/api/java/beans/XMLDecoder.html] and [java.beans.XMLEncoder | http://java.sun.com/j2se/1.4.2/docs/api/java/beans/XMLEncoder.html]. Its a quick 'n dirty sollution, and not a bad one as far as that goes. You have no control over the schema, but using it is very straightforward. \\
We used Castor back in Cisco. It was reasonable. I'd also look into SUN's [JAXB |http://java.sun.com/xml/downloads/jaxb.html].  As for search etc., you might want to consider an [XML database|http://xml.apache.org/xindice/] (unless the point was to avoid the DB in the first place). 
Whenever I need to do some new XML project, I take a look and see what's new on [http://www.xml.org/] and [http://www.alphaworks.ibm.com/xml]. [Dennis Sosnoski | http://www-106.ibm.com/developerworks/library/x-databdopt2/index.html]'s article compares several technologies, and is probably worth a read.