Paul Brown:

> I'm using the query:
>       "//enaml/header/date/text()"
> To try and retrieve all the text() nodes of the 'date' element from
> within a collection of 'enaml' documents, where <enaml> is the root
> element of each document.
>
> However the query returns no values into:
>
>       ResourceSet resultSet = service.query(xpathValue);
>
> i.e. resultSet.getSize() == 0.
>
> But the query:
>       "//enaml/header/date/."
> works, but returns a <date> node instead of the text() sub-node of that
> <date>.
>
> Where am I going wrong?

The query results returned by xindice have to be valid xml, so it can't
return only the text nodes. Neither can it return individual attribute
nodes. You need to extract the text from the returned date element.

Regards,
Suzan Foster.

Reply via email to