Combining the not function with a quantified expression : not « XQuery « XML






Combining the not function with a quantified expression


File: Data.xml


<order>
  <car model="A">
    <id>0001</id>
  </car>
  <car model="B">
    <id>0002</id>
  </car>
  <car model="B">
    <id>0003</id>
  </car>
  <car model="C">
    <id>0004</id>
  </car>
</order>


File: Query.xquery

not(some $model in doc("Data.xml")//car/@model
    satisfies ($model = "B"))


Output:

<?xml version="1.0" encoding="UTF-8"?>false

 








Related examples in the same category