Using following 2 MarkLogic Xqueries inorder to get expected result:
To list out all documents by timestamp
for $x in xdmp:document-properties()//prop:last-modified order by $x descending return <uri>{xdmp:node-uri($x)} {$x}</uri>
To search string in the document from the lastest file
for $a in doc("/contentC:/MLDemo/DataFiles/1234.xml")/*//@System_Name where $a ="Exchange" return $a
I am new to Marklogic and Xquery. Can someone plesae help me To combine these two individual scripts into one script.
Thanks in advance.