on 2016 Dec 19 2:44 PM
Hey experts,
in my scenario, i had a lot of incoming xml files. For each file i have to check if there is a specific element in this xml. If the element is existing, the message should be rejected. If the node is NOT existing, the message should be send to the configured receiver.
In the receiver determination, i said that if no receiver is found, the message should be ignored. Now i have to configure the condition, so that only xml-files without the element gets a receiver.
With the given four operations, this is not possible. I searched the internet and found some topics about my problem, but it still dont work. My non-functional solution is:
/p1:Node1/p1:Node2/p1:Node3[not(Element1)]
EXI also found and tried this, also without success:
/p1:Node1/p1:Node2/p1:Node3[count(Element)
= 0] EXIn both cases, it works exactly the other way it should work – the xml without element gets no receiver, but the xml with the element does.
Can you please give me a hint? 😉 We use PI 7.31
Regards,
Chris
Request clarification before answering.
Hi Chris!
Your second condition definitely should work. Try another one:
//p1:Node1[count(p1:Node2/p1:Node3/Element)=0] EX
Also check if namespace prefixes should be used for any/all elements in XPath and namespace definition is supplied.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christopher,
try with the below condition
count(/p1:Node1/p1:Node2/p1:Node3[Element]) = 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.