I have and xml field like this in sql server
<propertyDetail>
<importID>1735532</importID>
<pincode />
<landmarks />
<features>
<feature>Society Name: sec-87 srs peral floor faridabad</feature>
<feature>Transaction: Resale Property</feature>
<feature>Possession: Dec,2011</feature>
<feature>*Ownership: Freehold*</feature>
<feature>Age of Property: Under Construction</feature>
</features>
</propertyDetail>
I want to retrieve the feature which has value “Ownership: Freehold” through xQuery and sequence of features may vary.
Welcome any suggestion.
Where
@xis your xmlIf you want to find anything that starts with Ownership then
(but ideally you should improve your XML structure, if you can)