Hi,
You can even access the contents in the following way:
String xpath = "//xyz[@ id='abc']/gy" ;
XPathQueryService service =
(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
ResourceIterator results = resultSet.getIterator();
while (results.hasMoreResources())
{
Resource res = results.nextResource();
XMLResource document = (XMLResource)res;
if (document != null)
{
Node e = (Node)document.getContentAsDOM();
Document doc = e.getOwnerDocument();
NodeList nl=doc.getElementsByTagName("gy");
strid=(nl.item(0).getFirstChild().getNodeValue());
}
Avik
----- Original Message -----
From: Antoine Levy-Lambert <[EMAIL PROTECTED]>
Date: Friday, December 5, 2003 2:54 am
Subject: AW: Is it realy not possible ...
> the text() function gives the value of the text node.
>
> Cheers,
> Antoine
>
> -----Ursprungliche Nachricht-----
> Von: Thomas Zastrow [EMAIL PROTECTED]
> Gesendet: Donnerstag, 4. Dezember 2003 19:32
> An: [email protected]
> Betreff: Is it realy not possible ...
>
>
> ... to access the content - and not just an attribute - of a tag
> via XPath?
> What I mean: the solution from Jarkko a thread above doesn't work ...
> If it is so, I think Xindice is not realy usable? Please correct me!!
>
> Gretings,
>
> Tom
>
>
>
>