on 12-28-2009 12:32 PM
Hi,
I understand that the "EX" operator in an XPath check the existence of a node.
So, if I write something lke this ->
((/MAIN/NODE1[NODE2 = 'x']) EX)
This means that the condition will eval to true or false ONLY if the node exists?
For some reason I cannot get this to work properly.
(Note: In the actual scenario, I have an IDOC and I wish to perform a similar check on a tag that may or may not exist depending upon the situation).
Cheers,
Earlence
((/MAIN/NODE1NODE2 = 'x') EX)
This means that the condition will eval to true or false ONLY if the node exists?
(Note: In the actual scenario, I have an IDOC and I wish to perform a similar check on a tag that may or may not exist depending
upon the situation).
If your requirement is to check if a node exists or not then below is the condition which you should be using:
Left Operand: /MAIN/NODE1/NODE2
Middle Operand: EX
NO right operand in this case
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have tried it, but still an error is thrown in receiver determination
Eg: this is what I am using
(/MAIN/NODE1/NODE2 EX AND /MAIN/NODE1/NODE2 = '')
By this, It is supposed to check existence of NODE2 and THEN check the contents.
When I send a payload with NODE2 tag not existing, it fails in receiver determination
I have tried with double quotes also instead of single quotes.
Cheers,
Earlence
(/MAIN/NODE1/NODE2 EX AND /MAIN/NODE1/NODE2 = '')
If you requirement is to check if the node exists and has some value (i.e. should not be blank), the below should work:
(/MAIN/NODE1/NODE2 EX AND /MAIN/NODE1/NODE2 notEqual_fromDropdown)
No single/ double quotes are to be given.....in the second part of the condition use the not Equal operator.....and the right operand should be kept blank....do not fill any value
Regards,
Abhishek.
Hi,
Try this .. ((/MAIN/NODE1NODE2 = "x") EX). Use double coats instead of single. It should work.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.