Hi I have many XML files which have the structure like:
<mydoc>
<EC>
<spec>
<name>A para</name>
<para>A</para>
<val>40</val>
</spec>
<spec>
<name>Input Voltage</name>
<para>Vin</para>
<val>40</val>
</spec>
</EC>
</mydoc>
I need to filter out only those XML files which has a spec with para=Vin and val>30
What should be my Xquery like? In DB2 I have this so far?
for $x in db2-fn:xmlcolumn('TABLE.XMLCOLUMN')/mydoc
So this would iterate over all XML files and I will have mydoc element tag in $x but now how do I implement the multiple conditions and return just the name of the spec which satisfies my conditions?