XQuery 3.1 can extract and transform data from XML documents but also from any text files, including JSON ones. XQuery Update Facility adds expressions for modifying data without having to build new data.
Native XML database implementations come with many function libraries to extend XQuery allowing to interact with operating systems and to communicate with others.
XQuery can be defined as an extension of XPath allowing to construct nodes and perform more complex operations. As a consequence, XQuery can construct data as any Server Page solution (ASP, JSP): XML documents, XHTML+SVG+XForms pages,...