开发者

delete function in xquery

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜