Use the 'test-method' attribute on an optional structure.  Let say you
have a class name FirstClass that contains an attribute called
important.  You should also create a method called isImportant and use
this in the binding:
public class FirstClass {
    private boolean important;
...
    public boolean isImportant() { return important; }
}
 
<binding ...
    ...
    <structure name="VIP" type="com.myclasses.FirstClass">
        ...
        <struture name="ExtraInfo" usage="optional"
test-method="isImportant">
            <value name="MileId" field=.../>
        </structure>
    </strcuture>
 
This is all on top of my head, so don't hold me to the exact synthax,
but I hope that gives you the needed help!

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jatin
Sutaria
Sent: Tuesday, July 10, 2007 8:44 AM
To: jibx-users@lists.sourceforge.net
Subject: [jibx-users] Handling conditional Logic in JIBX



Hello, 

 

How would one incorporate a scenario like this: tag <b> should only be
inserted if <a>'s attribute 'myboolean' is 'true'

 

Thanks, 

Jatin

 


 



Disclaimer: The information contained in this e-mail and attachments if
any are privileged and confidential and are intended for the
individual(s) or entity(ies) named in this e-mail. If the reader or
recipient is not the intended recipient, or employee or agent
responsible for delivering to the intended recipient, you are hereby
notified that dissemination, distribution or copying of this
communication or attachments thereof is strictly prohibited. IF YOU
RECEIVE this communication in error, please immediately notify the
sender and return the original message. 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to