Andrew has been exceptionally helpful by private email. There does indeed appear to errors in my external method that he helped uncover. The good news is that I can now call the external method and insert a premature return that does return the text of the Parsed XML object. This means I will be able to overcome the problems in my external method. Parsed XML objects not working but File objects working helped uncover problems in my external method. The XML data is indeed getting to the external method. Update: The final solution Andrew will be pleased to know was simplicity itself. Because I discovered that a "return inputdoc" returned the actual data not the filename (object) all I had to do was change inputdoc.data to inputdoc. And it turned out to be Andrew's final suggestion as well :-) "or you could try str(nameOfObject) ... which if you're lucky will return something other than <ParsedXML Instance at .....>" So again many thanks Andrew. The answer is now so obvious. The input data was already a string. So I couldn't extract the data from the string. When I was using a file it was necessary to extract the data from the file object. Oh and Oleg Broytmann my initial dtml was fine. That is: <dtml-var "db2onehtml(_.getitem('test.xml'))"> Still works as it did for file objects. Regards, Adam