Starting with Oracle Database 10g Release 2, you can take advantage of a full-featured native XQuery engine integrated with the database. With Oracle XQuery, you can accomplish various tasks involved in developing PHP/Oracle XML applications, operating on any kind of data that can be expressed in XML.
The following figure shows the data sources with which Oracle XQuery can work.
As you can see from the figure, XQuery can be used to query any data stored in the database and out of it.
Note
Please note that XQuery is not available in the Express Edition of Oracle Database. For more information on Oracle XQuery, you can refer to Oracle documentation: chapter Using XQuery with Oracle XML DB in the Oracle XML DB Developer's Guide. You can also refer to the XQuery 1.0: An XML Query Language W3C Recommendation at http://www.w3.org/TR/xquery/.