Title: Re: Retieving parts of documents using XPath on a collection
Erick,
here is a Java example:

XPathQueryService service = ...;
String xpath = ...;
ResourceSet resultSet = service.query(xpath);
ResourceIterator results = resultSet.getIterator();
while (results.hasMoreResources()) {
    Resource res = results.nextResource();
    String resu = (String) res.getContent();
    // use String methods
}


Am 08.07.2002 15:03 Uhr schrieb "Erick Brière" unter <[EMAIL PROTECTED]>:

Using XMLObjects seems to be the best, at least for performance point of vue.

The problem is (for me) Java: does some body has a simple example for doing that ?
("that" = get result of an xpath query, keep only required nodes, dropping children).

Thanks,
Erick.


Ciprian Popovici wrote:
Friday, July 05, 2002, 15:47:09, Erick Brie`re <[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>  wrote:
  
(Perhaps my question concerns more Xpath than Xindice itself... ?)
Is there a way to get only nodes without their descendant(s) ?
    

I've asked the same recently. One answer seems to be to use XMLObjects
and alter the returned dataset at special requests. I'm working on it
but haven't advanced lately. Let me know if you get anywhere with it.

--Ciprian Popovici


  





--

Medizinische Hochschule Hannover                    Fachhochschule Hannover
Abt. Hämatologie und Onkologie     FB Informations- und Kommunikationswesen
Carl-Neuberg-Straße 1                               Ricklinger Stadtweg 120
30625 Hannover                                               30459 Hannover

                           ++49-511-9296-1650
                    http://summit-bmt.fh-hannover.de



Reply via email to