In Java applications, you can read XMLTypes from Oracle XML DB. The following example shows how to query binary XMLTypes in the Oracle database, and use them in a Java program.
To run the Java program, you need to make sure that the xmlparserv2.jar, ojdbc5.jar, and xdb.jar are included in the Java CLASSPATH. You can refer to Chapter 11 for the details of the Java libraries required by the Oracle XML DB applications. Chapter 16 explains how to add these libraries into Oracle JDeveloper projects.
Oracle XML DB Tip: Why do I get the “oracle.jdbc.driver.OracleSQlXML cannot be cast to oracle.xdb.XMLType” exception?
You have to use the correct JDBC driver. In Oracle Database 22.214.171.124, Oracle XML DB is compliant with ...