commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aravinda Addala" <aravinda_add...@majorband.co.uk>
Subject Digester: Examples
Date Tue, 04 Dec 2001 14:54:44 GMT
Hi,

I am new to Digester. I have looked at the examples and they are great to
understand.

I want to create objects based on the properties.
My XML file contains several employees each has a ID as property. How can I
use digester to initialize a employee object based on ID?

My XML looks like this:

<?xml version="1.0"?>
<employees>
<employee id=1 firstName="First Name" lastName="Last Name">
  <address type="home" street="Home Street" city="Home City"
                        state="HS" zipCode="HmZip"/>
  <address type="office" street="Office Street" city="Office City"
                          state="OS" zipCode="OfZip"/>
</employee>

<employee id=2 firstName="First Name" lastName="Last Name">
  <address type="home" street="Home Street" city="Home City"
                        state="HS" zipCode="HmZip"/>
  <address type="office" street="Office Street" city="Office City"
                          state="OS" zipCode="OfZip"/>
</employee>

</employees>

Please help.

Regards,
Aravinda.


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message