jibx: Object Type as Attribute

boniksac

New Member
I'm searching for a way to map subclasses, but they souldn't determ thier type by the tag name. Instead of that they should use a attribute.Here a small example to make it clear:My Classes are the following:\[code\] public class Attachment public class ImageAttachment extends Attachment public class PdfAttachment extends Attachment\[/code\]Currently I have following:\[code\] <attachment> <imageAttachment> ... </imageAttachment> </attachment> <attachment> <pdfAttachment> ... </pdfAttachment> </attachment>\[/code\]And here is what I want:\[code\] <attachment type="image"> .... </attachment> <attachment type="pdf"> .... </attachment>\[/code\]Is there a way to do it this way by jibx?
 
Back
Top