on 11-05-2007 4:12 PM
Hi guys!
In my interface determination I need to create following condition:
IF (/A/B=0 OR /A/C=0) AND (/X/Y=A OR /X/Y=B) ....
But the editor puts brackets with the AND statement! What is this good for? Since I know, AND has higher priority than OR so there is no need for using brackets with AND statement. But, there is necessary to use them with OR if we want to achieve some special condition (like my for example)...
Any ideas how to solve it?
Thanx, Olian
Works..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olian
(/A/B=0 OR /A/C=0) AND (/X/Y=A OR /X/Y=B)
In the above case there must be two condition to be true one before AND, second after AND.And moreover it will check conditions of the both side in any case whether it is before AND is true or not
(/A/B=0 OR /A/C=0) OR (/X/Y=A OR /X/Y=B)
In this case any one of the condition should true. And also if first side of the condition is true the there is no necessity to check other side of the condition.
<b>*****rewrds points if it help u undersatnd</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olian ,
best is to check the xpath expression with XMLSPY.
Thats the way we do it.
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olian,
If I am not wrong...with brackets in the condition..
IF (/A/B=0 OR /A/C=0) AND (/X/Y=A OR /X/Y=B) ....
It will give priority to bracket condition before executing outside condition..I mean
In above case value of (/A/B=0 OR /A/C=0) and (/X/Y=A OR /X/Y=B) would be calculated first before checking for "AND" condition for true values.
Hope this will help.
Let me know if you need more details.
Nilesh
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.