How can I get oracle XMLElement to JDBC?
java.sql.Statement st = connection.createStatement(); // works
oracle.jdbc.OracleResultSet rs = st.execute("SELECT XMLElement("name") FROM dual");
rs.getString(1); // returns null, why?
oracle.sql.OPAQUE = (OPAQUE) rs.getObject(1); // this works, but wtf is OPAQUE ?
Basically, I want to read String like <name> </name>
or whatever XML formatted output. But I always fail to cast output to anything reasonable. Only weird oracle.sql.OPAQUE works, but I totally dont know what to do with that. Even toString()
is not overriden!
Any ideas? How to read Oracle's (I am using Oracle 10.0.2) XMLElement (XMLType) ?