I am quite new to Marklogic and xquery in general. We have a collection of documents which have a deadline date as a node. Can somebody help me with an xquery to get the latest document based on deadline date? Each document looks like
<document>
<Id>blah<Id>
<DeadlineDate>2012-04-04T21:00:00</DeadLineDate>