3
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 element value Decision, for this I use the expression:
string(//decision) = 'ACCEPT'
And the expression works, if I remove some of the namespaces from the document, the way it is, the expression always returns false
because it cannot reach the value of the element.
How do I correct the expression to work with 2 or more namespaces?
P.S.: I have also tested using Xpath /root/body/checkCredit/CheckCreditOut/addresses/decision
Hello, Ulysses, thanks for the help, I tested the function and the problem continues, the expression does not seem to find the element (returns String='').
– Eduardo Silva
I had misspelled and just edited the answer. Did when you tested it was not yet with the error? The error was that the first local-name was with the value 'video', which does not have in its xml.
– Ulysses Alves