You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Gul Akbar <G....@Bradford.ac.uk> on 2003/04/03 11:24:38 UTC
Querying database with the ID
Hi all,
I have posted this before and got no replies, so I'm writing again with the
question rephrased!
How do I query my database collection when I know the ID that was set when I
added the records?
ID was set when adding the records using the following code:
String id = "record1";
XMLResource document = (XMLResource) col.createResource(id, "XMLResource");
When I query the database by some other field, the XML that is returned by
Xindice has a namespaces containing the ID.
Thanks
Gul
-------------------------------------------------
This mail sent through IMP: webmail.brad.ac.uk
Re: Querying database with the ID
Posted by Ali Mesbah <al...@West.NL>.
As quoted from Gul Akbar <G....@Bradford.ac.uk>:
>
> Hi all,
>
> I have posted this before and got no replies, so I'm writing again with the
> question rephrased!
>
> How do I query my database collection when I know the ID that was set when I
> added the records?
>
> ID was set when adding the records using the following code:
>
> String id = "record1";
> XMLResource document = (XMLResource) col.createResource(id, "XMLResource");
XMLResource document = (XMLResource) col.getResource(id);
> When I query the database by some other field, the XML that is returned by
> Xindice has a namespaces containing the ID.
>
> Thanks
> Gul
>
> -------------------------------------------------
> This mail sent through IMP: webmail.brad.ac.uk
--
-- Ali Mesbah, West Consulting B.V., www.west.nl, +31 15 2191600