Dear all,

I am trying to use Digester to read my own XML format (shown below) and
convert it to correctly initialized objects. 

<List>

<A ID="1" author="Home made">
        <range>90</range>
</A>

<B ID="2" author="Apple Inc." depends="1">
        <bitrate>90</range>
</B>

[...more entries here]

<C ID="7" author="CT" depends="4,6">
        <flavour>AAC</range>
</C>

</List>


Classes A, B, C are all derived from a parent class which has three
properties:
i) ID (integer)
ii) author (String)
iii) depends (array of IDs i.e integers)

Digester makes it very easy to create setter and getter methods and read in
(i) and (ii) above. But how do I modify the default Rule so that the String
value of the "depends" attribute is converted to an array of integers
property? I will be happy to reformat the depends="4,6" part if required. 

I currently use d.addSetProperties("List/A") to read in my other attributes.


Thank you for your time and patience,
Siddharth


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

Reply via email to