[Zope] SQL stored proc returns XML text; how to display in ZPT?

David Mitchell djmitchell at optushome.com.au
Wed Nov 12 06:58:53 EST 2003


Hello everyone,

I'm certain I'm missing something trivial, but it's getting late and I'm 
just about brain dead...

I've got a SQL stored procedure that returns an XML string.  I've 
written a ZSQL Method "dump_xml" that calls the stored proc; when I test 
it I get the XML string (although the formatting gets messed up when the 
browser tries to display it).  There's no parameters passed to "dump_xml".

How do I get Zope to return the XML data in a page?

WIthin a ZPT page, I've tried:

<span tal:replace="here/dump_xml" />  This returns something like 
<Shared.DC.ZRDB.Results.Results instance at 0x9001394>.  Obviously I can 
see dump_xml based on this error message; I'm just trying to render the 
wrong thing.

<span tal:replace="here/dump_xml()" />  This returns a key error

What am I doing wrong?


I'll happily use DTML, if anyone can give a solution.  I just want to 
get this XML page published and go home!

Thanks in advance

Dave M.




More information about the Zope mailing list