XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
xpathservice.setNamespace("h", "http://example.net/person");
ResourceSet resultSet = xpathservice.query(query);
ResourceIterator results = resultSet.getIterator();
List res = asList(results);
assertEquals(1, res.size());
XMLResource resource = (XMLResource) resultSet.getResource(0);