Geia sou Grigiri,

That's a good question and an extension of the API that supports this kind of operations
would be helpful indeed.
The way I did it was by parsing the output !
I could not find something smarted and faster.


George


PS: Basika auto einai ena provlima to opoio antimetopisa kai egw.
Apo osa exw dei mexri ta twra den ypostirizetai kati tetoio apeu8eias paramono me parsing.


Grigorios D. Tsoumakas wrote:

Hi,

Does anyone know how can I retrieve the value for an
attribute of an element through an XPath Query...
using the Xindice XML:DB API?

For example suppose that I have the following element somewhere
in the xml document in Xindice:

<example shape="circle" color="red">

I use the following XPATH query to retrieve all "example"
elements with color "red":

//[EMAIL PROTECTED]'red']

This works, but how do I get to the value of the shape attribute?

Alternatively I tried using the following XPATH query:

//[EMAIL PROTECTED]'red']/@shape

This should actually return the value of the attribute, but it
does not return anything as a ResourceSet...

Any ideas?

----------------------------------------------------------------------
Grigorios D. Tsoumakas, Phd Student
Department of Informatics, Aristotle University of Thessaloniki
Thessaloniki 54124, Greece
tel: +30-310998418 fax: +30-310998419 home page: http://users.auth.gr/~greg










Reply via email to