I'm having trouble unmarshalling a list of elements into a collection that
itself has an attribute:

<ipmiSensors>
   <psSensors redund="True">
      <powerSupply  status="ok"  present="True"   name="Power Supply1"/>
      <powerSupply  status="ok"  present="True"   name="Power Supply2"/>
   </psSensors>
</ipmiSensors>

If I ignore the 'redund' attribute, I can unmarshall this into a
Collection<T> instance easily:

<class name="mypackage.sensors.IPMISensors" auto-complete="false"
verify-constructable="false">
   <field name="powerSupplySensors"
type="mypackage.sensors.IPMIPowerSupplySensor"
               required="false" direct="false" transient="false"
container="false" collection="collection">
           <bind-xml name="psSensors" node="element" />
   </field>
</class>

This does exactly what I would expect, and add the <powerSupply> instances
to the Collection.

But that attribute on the <psSensors> element is puzzling me.   Obviously I
can't unmarshall this into a Collection<T> anymore - I have to create my own
subclass of, say, ArrayList<T>, right?   Except nothing I try seems to work.

Am I on the right track?   I really don't want to create a collection within
a collection -- I don't want to make this one class different than all of
the others in the set I'm working with.

Any advice?

Jeff

Reply via email to