@isahore has addressed a few issues in that reply.When executing your query, you will build a "schema" collection, rather than a "data" collection, which the original code assumesThe XML declaration is not always necessary, but is best practice.The toXMLString is not necessary, but not problematic i...