I have to select only unique records from an XML document, in the context of an loop. I am limited by Visual Studio to usi
I. As a single XPath expression:
/*/item[normalize-space() and not(. = preceding-sibling::item)]
II. More efficient (XSLT) implementation, using keys:
Both I and II, when applied on the provided XML document correctly select/copy the following nodes:
2010-06-24 10:00:00 13:00:00
2010-06-25 10:00:00 12:00:00
2010-06-26 13:00:00 14:00:00
2010-06-26 10:00:00 12:00:00
Update: In case has other children, then this transformation:
produces the wanted result.