I think Xquery has not the "AND" operator and i cant do this:
if node1 = xxx and node2 = yyy and node3 = zzz then replace node3 with www
XQuery has And Operator which is "and". it has OR operator also "or".
let $d := <Employee>
<Name>Test</Name>
<ID>1909239</ID>
<Address>test Add </Address>
<Email>[email protected]</Email>
<Department>Dept 1</Department>
<Department>Dept 2</Department>
<Department>Dept 3</Department>
<Department>Dept 4</Department>
<Department>Dept 5</Department>
return if( ($d//*:Department[1]/text() = 'Dept 1') and ($d//*:Department[1]/text() = 'Dept 2') ) then fn:true() else fn:false()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With