commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit <>
Subject [Digester] How to get element values from multiple xml documents
Date Mon, 20 Aug 2007 09:49:44 GMT
Hi All,

I am using Digester to parse xml document. My xml document looks as follows

<address id="1">
<street>street 1</street>
<city>city 1</city>
<address id="2">
<street>street 2</street>
<city>city 2</city>

I create a javabean class with attributes street and city. Now every time I
parse this file with digester I set the values of these attributes.
The problem is everytime I parse the javabean is set with the last <address>
attributes here street 2 and city 2 and hence the first and consecutive
<address> values are overwritten. How can I make every <address> element
stored or accessible without getting overwritten..?
Any help appreciated.


<a href=";id=111787&amp;t=1">Get

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