You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Marius Hanganu <ha...@gmail.com> on 2007/01/29 23:25:41 UTC

Building java bean from both XML attributes and content

Hi,

We need to build a Java bean from an XML snippet like the following:

<user property="name">Superman</person>

The XML is imposed by an external source. How can rules be defined in
digester to load two properties for a bean called user?

User {
   private String property; // mapped from attribute "property"
   private String value; // mapped from XML tag content
}

Regards,
Marius Hanganu