Hi, thanks for this great tool!
I just started using JiBX, and I would like to know how to ignore tags during unmarshalling *but* without describing those tags in the binding file.

For example, I have the following XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Status>
   <Num1>0</Num1>
   <Num2>1</Num2>
</Status>

So, I created the following binding file:
<?xml version="1.0" encoding="UTF-8"?>
<binding direction="input">
 <mapping name="Status" class="Status" ordered="false">
   <value name="Num1" field="myNum1" usage="optional"/>
   <value name="Num2" field="myNum2" usage="optional"/>
 </mapping>
</binding>

Everything works fine, but the problem for me is that the XML is created by a third party application, that in the future can add new tags to the structure, without advice. For example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Status>
   <Num1>0</Num1>
   <Num2>1</Num2>
   <Text>blabla</Text>
</Status>
In this case I will get an exception in the unmarshalDocument call.

I was looking at old threads and seems like the solution will be available only in future releases of JiBX (2.0).
Is there any workaround for this situation?
Should I use another binding tool? which one you recomend?

Thanks in advance,
Fernando


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to