The W3C XQuery working group has posted a new candidate recommendation of XQuery Update Facility. XQuery as it currently exists is basically just SELECT in SQL terms. XQuery Update adds INSERT, UPDATE, and DELETE. More specifically it is:
upd:mergeUpdatesupd:revalidateupd:applyUpdatesupd:insertBeforeupd:insertAfterupd:insertIntoupd:insertIntoAsFirstupd:insertIntoAsLastupd:insertAttributesupd:deleteupd:replaceNodeupd:replaceValueupd:replaceElementContentupd:renameupd:removeTypeupd:setToUntypedThis is one of the last two pieces before XQuery 1.0 is really complete. (The other is full-text search.)