I'm writing xml-java binding along with semantic validation using JiBX. I use "deserializer" attribute to specify a method which performs this semantic validation and returns the given string if sucessful or throw an exception if not. For instance, my binding file looks like :
<value name="LEVEL" field="confidentialityLevel" deserializer="foo.bar.Validation.checkLEVEL" />
I must do this manner because I don't have the control on the Java classes of the binding (an other company is writing them). So I can't use the get and set attribute and put the validation there.
My problem is when there is a validation error, I want to retrieve the tag name where it happened. In the above exemple if the checkLEVEL method checks if the string is equal to "CIVIL" or "DEFENSE" and the xml is not valid, I would like to display to the user which tag is unvalid ("LEVEL" here).
Is there a way to do this ?
Thanks for your answer,
Laurent
------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
