Yu DENG wrote:

Dear all, I could not run the xpath query with a contains function on my machine. Really frustrated. I checked my code with the previous messages in the mailing list. It should be correct. However, it always return empty result.
I am using address1.xml (an example in xindice) to test the code. The code is as follows:


col = DatabaseManager.getCollection("xmldb:xindice://localhost:4080/db/addressbook");

String xpath = "//person[contains(email,'jsmith')]";

XPathQueryService service = (XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
ResourceIterator results = resultSet.getIterator();


I am using xindice 1.0 on Windows 2000. Does anyone know how to fix this problem? Thanks a lot.

Try using Xindice 1.1. You'll find it much more developed, and much better supported. And will probably fix your problem.

Regards, Upayavira





Reply via email to