It seems cx_Oracle doesn't.
Any other suggestion for handling xml with Oracle and Python is appreciated.
Thanks.
I managed to do this with cx_Oracle.
I used the sys.xmltype.createxml() function in the statement that inserts the rows in a table with XMLTYPE fields; then I used prepare() and setinputsizes() to specify that the bind variables I used for XMLTYPE fields were of cx_Oracle.CLOB type.
I managed to get this to work by wrapping the XMLElement call in a call to XMLType.GetClobVal()
:
For example:
select xmltype.getclobval(xmlelement("rowcount", count(1)))
from...
No idea of the limitations yet but it got me out of trouble. Found the relelvant info on Oracle site: Mastering Oracle+Python, Part 1: Querying Best Practices
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With