commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Keese <>
Subject [digester] how to use digester with a class hierarchy
Date Wed, 19 May 2004 02:26:24 GMT
I'm curious how people use digester to persist class hierachies.
Consider the class hiearchy below (that represent graphical objects).

class Component { int x,y; }
class TextString extends Component { String text; }
class Rectangle extends Component { int width, height; }

There are two ways represent a TextString in XML:
<textString><x>10</x><y>20</y><text>Hello world</text></textString>

Which is better? I would guess that the first version is more common,
but the second version allows simple searches of all components based on
their x/y coordinates.

Can digester digest the second version?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message