cx_Oracle currently does not support the XMLType (as you have
noticed). You can work around this fairly easily though by simply
transforming it into a type that cx_Oracle does support as in the
example below.
import cx_Oracle
connection =3D cx_Oracle.Connection("anthony/dev@dev")
cursor =3D connection.cursor()
cursor.execute("""
select
Id,
XMLType.GetClobVal(Value)
from XMLTable""")
for id, value in cursor:
print "Id:", id
print "Value (length):", value.size()
file("test_%d.xml" % id, "w").write(value.read())
Hope that helps.
On 1/19/06, Gooch, John <Joh...@ec...> wrote:
> Has someone come up with a way to run the Oracle Java/C++ XML Query
> functions? These take a normal query as input, but return the results in
> XML format.
>
> What I plan on doing to have an ASP Web page and feeds data in XML
> format my Flash UI, which has XML data retrieval, storage, and parsing
> facilities built in.
>
> Thank You,
>
>
> John A. Gooch
> "May the Python-force be with you...always."
> Systems Administrator
> EchoStar Satellite L.L.C.
> Desk: 720-514-5708
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=103432&bid#0486&dat=121642
> _______________________________________________
> cx-oracle-users mailing list
> cx-...@li...
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
|