String resourceName = "QueryTestPerson.xml";
String id = "test." + System.currentTimeMillis();
String content = "<?xml version='1.0'?><person id=\"" + id + "\"><name>Jason</name></person>";
resource = testCollection.createResource(resourceName, "XMLResource");
resource.setContent(content);
testCollection.storeResource(resource);
XPathQueryService service = (XPathQueryService) testCollection.getService("XPathQueryService", "1.0");
ResourceSet rs = service.query("/person[@id='" + id + "']");
for (ResourceIterator iterator = rs.getIterator(); iterator.hasMoreResources();) {