Thanks Robert, that's the correct answer. I just had to pass in an argument.

do output.XMLExportToString(.xml)
$$$TRACE("output :"_xml)