commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marius Hanganu" <>
Subject Building java bean from both XML attributes and content
Date Mon, 29 Jan 2007 22:25:41 GMT

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

Marius Hanganu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message