commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marius Hanganu" <hanga...@gmail.com>
Subject Building java bean from both XML attributes and content
Date Mon, 29 Jan 2007 22:25:41 GMT
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

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