New to XQuery and probably a noob q. I installed a BaseX db as my sandbox (which included a sample file etc/factbook.xml). I constructed a simple query which I thought would return all 'cities' with population > 10million.
for $x in doc("etc/factbook.xml")/mondial/country
where $x/city/population > 10000000.0
return $x/city
but I'm getting cities with lower populations, any insight?
<city id="f0_1726" country="f0_553" longitude="126.967" latitude="37.5667">
<name>Seoul</name>
<population year="95">10229262</population>
</city>
<city id="f0_10300" country="f0_553">
<name>Kunsan</name>
<population year="95">266517</population>
</city>
(I've only included first two but many more both < and > 10million)