xpath for xquery in SQL
- by Haroldis
Hi all,
I have a xml filed in sql table
the xml have the structure like these
<root>
<element>
<sub name="1">
<date>the date <date>
</sub>
<sub name="2">
<date>the date <date>
</sub>
<sub name="3">
<date>the date <date>
</sub>
.....
<element>
</root>
how i can get the date of the element with the name 1?
I have prove :
/root/element/sub[Name = "1"]/date/text()
but nothing hapen.
any ideas?