1. A computer-implemented method comprising: receiving by a processor an XQuery query from a Java application via an XQuery API for Java (XQJ), the Java application attempting to access a relational data source having a relational data model; generating by the processor XML results responsive to the XQuery query, based on data from the relational data source by: dividing the XQuery query into one or more XQuery expressions; determining for the one or more XQuery expressions if an XML data source or the relational data source is being queried; retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data if the relational data source is being queried; and executing in the XQuery engine at least one XQuery expression using the retrieved relational data if the relational data source is being queried; and sending the XML results to the Java application via the XQJ.