xdmp:document-delete( $uri as xs:string ) as empty-sequence()
Deletes a document from the database.
Parameters | |
---|---|
uri | The URI of the document to be deleted. |
The xdmp:document-delete
function deletes
a document and all of its properties, except, when
directory-creation
is set to automatic
or
manual-enforced
, the directory property; it does
not delete a directory with the same URI as the document being deleted unless
directory-creation
is set to manual
.
To delete a directory, use the xdmp:directory-delete
function.
If a document does not exist at the specified URI,
xdmp:document-delete
throws an error.
xdmp:document-delete("example.xml")