commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatarman, Rajagopal" <>
Subject [Digester] Attribute Mapping
Date Tue, 25 Feb 2003 19:16:49 GMT
Im trying to use the Digester to map attribute key-value to a bean property.
This is the format of my XML

<Employee Name="Raj">

Now to parse this using digester, i had to split the Attribute into key and
value, like
<Employee Name_Key="Name" Name_Value="Raj">
And using digester code as

digester.addSetProperty("Root", "Name_Key", "Name_Value");
which would assign the Attribute Name to "Raj" in my bean.

Is there an easier way to do this? Right now, i have to use a stylesheet to
convert my original XML into the Name-Value formatted XML and pass through


Unless expressly stated otherwise, this message is confidential and may be privileged. It
is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized.
If you are not an addressee, any disclosure or copying of the contents of this E-mail or any
action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you
are not an addressee, please inform the sender immediately.

View raw message