First create a JDBC connection. Send a SQL query to a JDBC Result Set, which is input to an OracleXMLQuery() instance, or directly to an OracleXMLQuery() instance which sends either a getXMLDOM() call to a DOM object, or a getXMLString() call to an XMLString object. These produce output for further processing.