xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject RE: Use cases
Date Thu, 25 Sep 2003 14:24:08 GMT
Actually, it should be:




Or perhaps:


"contains(/movie/title, 'Gladiator')"






From: jcplerm [mailto:jcplerm@ameritech.net] 
Sent: Thursday, September 25, 2003 7:15 AM
To: xindice-users@xml.apache.org; Boris Rousseau


Shouldn't the query be like:?



----- Original Message ----- 

From: Boris Rousseau <mailto:brousseau@tssg.org>  

To: xindice-users@xml.apache.org 

Sent: Thursday, September 25, 2003 9:10 AM

Subject: Use cases


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