XQuery is pretty powerful, and I used it extensively with xlst in the 2000s, but it's a dead tech and not something you should ask your users to use.
Just use JSON.
Also, if you absolutely insist on using it, do not use namespaces, and avoid attributes. All us older timers could tell you about the number of frustrating XML configs we had to deal with that had overcomplicated or completely irrational structures. And namespaces and attributes were the biggest offenders.