I tried via seq to filter a record that had an xml field, with that xml below:
<ns1:Prod xmlns:ns1="uri">
<ns1:ProductID>316</ns1:ProductID>
<ns1:Name>Blade</ns1:Name>
</ns1:Prod>
<ns1:Prod xmlns:ns1="uri">
<ns1:ProductID>317</ns1:ProductID>
<ns1:Name>LL Crankarm</ns1:Name>
<ns1:Color>Black</ns1:Color>
</ns1:Prod>
and my query was:
select *
from tabela
where [campo_xml].value('(/Prod//ProductID//node())[1]', 'int') = 316
and did not return anything, does anyone have any idea what's missing?