Wäre schön, wenn du da mal einen Link zeigst, wie man aus einer SQL-Table/PF ein neues XML-Dokument erzeugst.

So auf die Schnelle konnte ich nur folgendes finden:

XML input and output overview

Output

SQL is used to retrieve the XML data from the database system.
When querying XML data using an SQL fullselect, the query occurs at the column level. For this reason, only entire XML documents can be returned from the query. The XMLTABLE built in table function can be used to retrieve fragments of an XML document in an SQL query.

Mit anderen Worten.
Ich kann komplette XML-Dokumente speichern, abfragen und wieder ausgeben.