[MarkLogic Dev General] xdmp:directory question

Danny Sokolsky dsokolsky at marklogic.com
Fri Nov 17 10:25:39 PST 2006


Hi Charles,

The URI you specify in xdmp:directory refers to a URI of a directory
stored in a MarkLogic database, not a URL on the internet.  It returns
all of the documents in that directory, which means all of the documents
with the same base URI that exist in that MarkLogic database.  For
example, the following:

xdmp:directory("/mydir/", "infinity")

returns all documents in the database that have URIs starting with
"/mydir/", so it would return the documents with URIs "/mydir/doc.xml",
"/mydir/foo.xml", and so on, assuming those documents existed in the
database.

For more information about directories in MarkLogic server, see chapter
13, "Properties Documents and Directories," in the Developer's Guide
(http://developer.marklogic.com/pubs/3.1/books/dev_guide.pdf). 

If you want to retrieve documents at a URL on the web, use xdmp:http-get
(http://developer.marklogic.com/pubs/3.1/apidocs/Extension.html#http-get
). 


-Danny

-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Charles
Blair
Sent: Friday, November 17, 2006 7:22 AM
To: general at xqzone.marklogic.com
Subject: [MarkLogic Dev General] xdmp:directory question


the documentation for xdmp:directory implies that the function should
return the documents in a directory, but when i give it an argument for
an arbitrary URL on the net (world-readble, with xml documents in it),
i'm not getting back anything. does "directory" here have a special
meaning, such as, directory on the marklogic machine, or directory in
the marklogic database (whatever that might mean)?

i've checked the obvious, such as trying to retrieve a directory listing
from the specified location in a plain browser window, with success.
what i'm trying to do is find an easy way to batch-load thousands of
documents w/o having to enumerate them individually (which i can
automate, but it is still more easy to point marklogic to a directory
with those documents in it, if that is possible, as the documentation
seems to imply).

thanks. 
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general



More information about the General mailing list