It always starts with a simple task that one simple script will surely satisfy easily. Depending on multiple environment constraints, there are, then, more and more scripts, written in different and, possibly, multiple programming languages, doing similar actions with more and more instructions in them.

Procedural programming languages are quite verbose: step by step, loops after loops, handlers and variables are necessarily created and modified. This is still more or less how processors effectively act.

Hopefully, there are much more concise programming languages where developers just describe what they want to get. XQuery is one of them. Benefits are readability and maintainability, even for non-programming consultants or domain experts.

It is surely interesting to evaluate XQuery as a unique script language and to identify required extensions for manipulating data. The best way to do that is to implement an XQuery engine for that purpose.