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>
<Component><x>10</x><y>20</y><textString>Hello
world</textString></Component>

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?

Thanks,
Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to