How can I select only distinct elements for the XML document using XPATH?I\'ve tried to use the \'distinct-values\' function but it didn\'t work for some reason..
distinct-values() is available in XPath 2.0. Are you using that?
If distinct-values() is not available, the standard way of getting distinct values is to use not(@result = preceding:: @result) to get unique @result. It will give you the first occurrence only.