Hi BaseX-ers, I'm running into an out-of-memory error when running an updating query over (almost) every document in the database. Every doc has the form <root> <entry><node3/><node2/>...</entry> <entry><node2/><node1/>...</entry> ... </root> I am reordering the elements in every <entry/> element in every document (e.g. <node1/><node2/><node3/>). The query is easy enough to write, it reorders the elements in every <entry/> and replaces the <entry/> in the document with the reordered <entry/>. It works for just one document, but as I said, the db keels over when applying the query to every document. (I am not using any doc() function by the way, just matching on the top level <root/> node.) Do you have a suggestion how I could make this work? I've looked at the documentation on the BaseX website about XQuery Update, but frankly, I do not really understand the bit about documents not being updated, I just select a node from the database, update it, works fine... I must be missing something... (the point probably ;-)). I am using the basex REST api. Huib Verweij.