commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Carreira <>
Subject [Digester] How can I build a Calendar from XML pieces?
Date Fri, 04 Apr 2003 18:21:50 GMT

I'm new to Digester and trying to replace some Castor XML binding with 
Digester rules. We've got one complex XSD type which is a structure like 


In our current code, the <Date> element builds a Castor Date and the 
<Time> element, which is optional, builds a Castor Time object. We've 
got translation code which takes the year, month, and day from the Date 
object and the time fields from the Time object (if it's there) and 
builds a Calendar from it to be used in our domain models.

I'm looking to bypass the Castor objects and translation and just build 
our domain models from the XML using Digester. My current question is, 
how would I go about translating the above structure into a Calendar? 
Part of the problem is that the ObjectFactory stuff only takes 
attributes, not sub-elements or the body text, otherwise I could create 
an ObjectFactory.

Thanks very much,

Jason Carreira

View raw message