SDH (Sure Did Help!!!!)  ;-)

however,

// query a resource called: ad
ResourceSet resultSet = service.query("ad", xpath);

should have been

// query a resource called: ad
ResourceSet resultSet = service.queryResource("ad", xpath);

thanks michael! hey, in which part of this planet do you exist?

sincerely,
-nani

-----Original Message-----
From: Michael Gratton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Document-level Queries




Jayaram Narayana wrote:
> thanks michael for your answer. unfortunately, i already knew this as read
> from the documentation. it is not helping me query a document in the
> following simple hierarchy:
>

Right, well, to use your example, and to borrow from the Xindice
developer's guide, here's an example code fragment:

// get your collection: /db/a
Collection col = DatabaseManager.getCollection("xmldb:xindice:///db/a");

// set up the query
String xpath = "//project";
XPathQueryService service =
   (XPathQueryService) col.getService("XPathQueryService", "1.0");

// query a resource called: ad
ResourceSet resultSet = service.query("ad", xpath);

// do something with the results

>
> is there a good 'chart' somewhere of the xindice api contents and
hierarchy?
>

Well, you don't need to deal with the Xindice API, you only really need
to deal with the XMLDB api. I find the Javadocs best for this sort of
thing..

> btw, what is HTH?
>

An appreviation for "Hope That Helps".. 8)

--
Mike Gratton <[EMAIL PROTECTED]>, <http://web.vee.net/>
Leader in leachate production and transmission since 1976.


Reply via email to