title: Marklogic how to retrieve text documents
body: <p>How can I return a list of text documents store in DB.  I use fn:document-uri() but return errors looking for node().  Thanks</p>
  
  <pre><code>13. let $uris := fn:document-uri(cts:search(fn:doc(),"sudo*","unfiltered"))
  14. 
  15. for $uri in $uris
  </code></pre>
  
  <blockquote>
    <p>[1.0-ml] XDMP-ARGTYPE: (err:XPTY0004)
    fn:document-uri((fn:doc("/Howto-shutdown-and-restart-AWS-DEV.txt"),
    fn:doc("/How-to-shutdown-restart-Oracle.txt"),
    fn:doc("/How-to-shutdown-restart-MYSQL.txt"))) -- arg1 is not of type
    node()</p>
  </blockquote>