Is there a built-in delete function in XQuery
that I can use to delete the actual file in the database in a certain directory say a/b/c/d.xml
开发者_如何转开发
How to implement one if there is no such function?
Deleting a document is implementation dependent. In MarkLogic Server, you would do this:
xdmp:document-delete("a/b/c/d.xml")
I realize that this question was posted nearly a year and a half ago, but I thought this would be a helpful contribution.
If you just want to delete a node, you can use this:
xdmp:node-delete(/parentNode/childNode)
The childNode would be deleted.
See this link
In Zorba and BaseX you would do file:remove("a/b/c/d.xml") (there are also other processors supporting this module, please add)
精彩评论