commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Cash" <>
Subject [Digester] Create an object using parent attribute
Date Thu, 24 Jun 2004 20:30:20 GMT
I'm trying to figure out how I can create an object using a parent attribute
value as the className for the child. Here's a sample XML snipet:

<parent childClass="mypackage.childClass">
   <child attribute1="value1" attribute2="value2"/>
   <child attribute1="value3" attribute2="value4"/>

I've created and initialized parent with the following:

        digester.addObjectCreate("parent", "mypackage.parentClass");

The problem comes in with creating the child. I've looked at archives of this
news group and haven't found the right way to do this with a current version.
I'm new to Digester and the documentation, while not bad, leaves something to be
desired. What I'd like to do is something like this:

        digester.addObjectCreate("parent/child", <value of

Do I need to create my own ObjectCreationFactory to do this?

Thanks in advance.

Rob Cash
Technical Architect & Application Developer
Information Services
Nortel Networks (
Tel: (919) 992-7871

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message