Hi, I have an abstract class, an a set of implementations like this:
class System
- collection vehicles
class Vehicle
- String brand
- String license
- String other
class Truck extends Vehicle
- int wheels
- int maxLoad
class Bus extends Vehicle
- int maxPassangers
- boolean hasRestroom
Now, I have an XML which I cannot modify, just load it into my classes. As
you can see, I have to load a collection of vehicles, from this XML
document:
<System>
<Truck>
<Brand>Saab</Brand>
<Wheels>20</Wheels>
<License>FMJ 212</License>
<MaxLoad>1500</MaxLoad>
</Truck>
<Bus>
<Brand>Saab</Brand>
<Other>It's an old bus, should be replaced</Other>
<HasRestRoom>true</Wheels>
</Truck>
</System>
So, my problem is...
I have to load a this Vehicle collection from the Bus/Truck instances.
How can I make a mapping for this? I've tryied, but I cannot achieve
unmarshaling an unordered class which fields inherited from the abstract
class, which are also optional. Is this possible?
If you need I can send you my mapping which didn't work quite OK.
All help will be appreciated.
Thank you,
Marcelo.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users