commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: [Digester DynaBeans] How to combine ?
Date Tue, 01 Jul 2003 15:14:12 GMT

Kai wrote:
> Hi all,
> i am new to digester and i find the philosophy behind it very 
> interesting. The following question turned out:
> is it possible (and if, how) using Digester to parse my xml file and
> creating dynabeans out of the parsed properties ?

Do you mean to generate the code to make a dynabean class?  I suppose 
you would have to write a class such as DynaBeanGenerator which has 
methods that can be called by a Digester instance as it parses the XML, 
perhaps writing out the code to a StringBuffer.  Then at the end of the 
XML file the Digester can instruct the DynaBeanGenerator to write the 
StringBuffer's contents to a file, or something.

But note that there are some XDoclet tags that can let you go in the 
other direction.  I'm not sure about Dynabeans.  But you can incorporate 
the XDoclet tags into your Java code that automatically generates your 
struts-config.xml file.


View raw message