xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Rousseau" <brouss...@tssg.org>
Subject Use cases
Date Thu, 25 Sep 2003 14:10:33 GMT
Hi all,

I have tried using this XPath search on my XML collection

String xpath = "/movie/title='Gladiator'";
XPathQueryService service =
   (XPathQueryService) collection.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
ResourceIterator results = resultSet.getIterator();
while (results.hasMoreResources()) {
   XMLResource resource = 
      (XMLResource) results.nextResource();
   Node result = resource.getContentAsDOM();

However, I get several nodes back as the result from the query and only the last one gets
in the Node structure, the rest is discarded.
Is there a way around to get all the results in the Node or in a DOM document (maybe using
a string)?

View raw message