commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject [digester] help with digester rules
Date Fri, 07 Jan 2005 17:17:06 GMT

I've only used Digester as a part of Struts, but now I'm trying a simple
standalone example.

I have this XML:
<person key="012456">
  <preferredName>Ms. Janice D. Jones</preferredName>

And I'm getting the object created and the key set, but none of the
examples I can find shows a property(?) nested immediately within the
object, it's always Catalog->Magazine->title so that you're setting
properties on a child object, then adding the child object to the

Here's the rules.xml file I'm  using:

   <object-create-rule pattern="person"
           classname="edu.asu.vpia.dto.custom.PersonViewImpl" />
   <set-properties-rule pattern="person" >
      <alias attr-name="key" prop-name="key" />

   <pattern value="person/preferredName">
      <call-method-rule pattern="preferredName" 
           methodname="setPreferredName" paramcount="0" />

What should the rule be so that it will call setPreferredName directly
on the PersonView object?

Wendy Smoak

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

View raw message