.net - XPath to get the element with the highest ID -
xml source:
<documents> <document> <id>3</id> </document> <document> <id>7</id> </document> <document> <id>1</id> </document> </documents> i need document-element highest value in id-element (so <document><id>7</id></document> in example). can't change c# code, xmldocument.selectsinglenode(...), can modify xpath used.
is there documents/document[id=max(id)] or order id descending it?
documents/document[not(../document/id > id)]
Comments
Post a Comment