Is there an Oracle shell for Python that supports xmltype columns?

It seems cx_Oracle does not.

Any other suggestion on xml processing with Oracle and Python is welcome.

Thanks.

+5
source share
3 answers

I managed to do this with cx_Oracle.

I used the sys.xmltype.createxml () function in an instruction that inserts rows into a table with XMLTYPE fields; then I used prepare () and setinputsizes () to indicate that the bind variables that I used for the XMLTYPE fields were of type cx_Oracle.CLOB.

+1
source

I managed to get this to work by wrapping the XMLElement call in the call XMLType.GetClobVal():

:

select xmltype.getclobval(xmlelement("rowcount", count(1)))
from...

, . Oracle: Oracle + Python, 1:

+1

(, -Oracle Python DB-API- , , ).

cx_oracle ( DCOracle2 , "DCOracle2 , ." ).

article Oracle , ( , , Oracle 10g XE - cx_oracle) Python Oracle XML - , , , !

0

All Articles