Using latest JiBx

Hi I have the following binding....


<structure name="details">
<structure name="SomeCCCard1" usage="optional">
<value name="cardNumber" field="acctNumber"/>
<structure name="expiryDate">
<structure name="date">
<value style="attribute" name="month" field="expMonth"/>
<value style="attribute" name="year" field="expYear"/>
</structure>
</structure>
<structure>Other tags here...</structure>
</structure>
<structure name="SomeCCCard2" usage="optional">
<value name="cardNumber" field="acctNumber"/>
<structure name="expiryDate">
<structure name="date">
<value style="attribute" name="month" field="expMonth"/>
<value style="attribute" name="year" field="expYear"/>
</structure>
</structure>
  <structure>Other tags here...</structure>
</structure>
</structure>

In the XML I can either have only SomeCCCard1 or SomeCCCard2 but Jibx
throws...

org.jibx.runtime.JiBXException: Expected "details" end tag, found
"SomeCCCard2" start tag (line 11, col 15)

In my XML I'm using <SomeCCCard2>

Also is there a way to simplify the binding for this case I have up to 20
different mutually exclusive cards so SomeCCCard3, SomeCCCard4,
SomeCCCard5. So the whole xml is the same except for that unfortunate tag.
Beats me why it's not an attribute. Would have been so much simpler. You
said I should do an XSl transform? Would that not be slow? And pointless of
putting before Jibx?
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to