I have the following xml:
<root xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<body xmlns="http://www.foo.com/bar">
<checkCredit>
<CheckCreditOut>
<nomeSerasa />
<addresses>
<id>9-CAZ7QCU</id>
<decision>ACCEPT</decision>
</addresses>
</CheckCreditOut>
</checkCredit>
</body>
</root>
I want to validate the value of the decision element, for this I use the expression:
string(//decision) = 'ACCEPT'
And the expression works, if I remove any of the namespaces of the document, as it is, the expression always returns false
because it can not reach the value of the element.
How do I correct the expression to work with 2 or more namespaces?
P.S: I also tested using XPath /root/body/checkCredit/CheckCreditOut/addresses/decision