XQuery is a fully typed functional programming language. As such, it is elegant, but for a programmer who only knows imperative languages, it takes some getting used to. Writing extensive programs in XQuery requires intellectual discipline. The result is extremely compact code that is difficult to sneak into for careless errors. On the other hand, very different architectural interfaces are possible. You can use XQuery in the same way as SQL. Only the access to the data is written with XQuery, everything else with Java, Python or C#.
If you have decided to code more brazil telegram screening than what is absolutely necessary with XQuery, then maps, arrays or sequences are modern elements for structuring data. The signature of a function can also be described precisely:
declare %public function my-module:find-customers
This function find-customers is public and is called with two strings as parameters. It returns a sequence of elements <customer> which can also be empty. If an error occurred during programming so that the result of the function contains, for example, an element <surname> , an error is thrown during execution.
Error handling corresponds to that of a modern programming language with a try/catch structure. The natural unit of a functional language is functions, which can be stored in modules. Modules are then assigned to a namespace.