Thanks Sergy but I am under the impression that CURSORToXML() will not work in this case because each XML file contains a number of tables/nodes. The XML schema has already been defined externally and all we can do is work with it, we cannot change it.