public final XObject executeXPath( OzoneXPathQuery _query ) throws Exception {
if (_query.rootNode == null) {
_query.rootNode = getDocument();
}
XPathQuery query = xpathQueryFactory.newXPathQuery();
query.setQString( _query.qstring );
if (_query.filter != null) {
query.setNodeFilter( _query.filter );
}
if (_query.namespace != null) {
query.setNamespace( _query.namespace );
}
return query.execute( _query.rootNode );
}