Peter Charles wrote:
One question.
It seems that the results from xpath_query are retuned as a set of xml
results, is there a design reason why queries don't return an valid xml
document?
Reason is in API, org.xmldb.api.modules.XPathQueryService:
/**
* Run an XPath query against the <code>Collection</code>. The XPath will be
* applied to all XML resources stored in the <code>Collection</code>.
* The result is a
* <code>ResourceSet</code> containing the results of the query. Any
* namespaces used in the <code>query</code> string will be evaluated using
* the mappings setup using <code>setNamespace</code>.
*
* @param query The XPath query string to use.
* @return A <code>ResourceSet</code> containing the results of the query.
* @exception XMLDBException with expected error codes.<br />
* <code>ErrorCodes.VENDOR_ERROR</code> for any vendor
* specific errors that occur.<br />
*/
ResourceSet query( String query ) throws XMLDBException;
Vadim