Hi, I need some help here. I have the following
...
<page>
<objectives>
<objective>Objective 1</objective>
<objective>Objective 2</objective>
</objective>
<page>
<page>
<objref num="2"/>
...
</page>
<page>
<objref num="1"/>
...
</page>
...
I need an XPATH expression (1.0 or 2.0) that automatically retrives the contents of the 'objective[n]' element from the 'objref' element for an id="n" ('n' is an integer)
for example if <objref num="1"/> I need the contents inside of the first objective element
Is that possible?
I tried something like this from the 'objref' element:
(../../page[1]/objectives/objective)[@num]
but this does't return anything.
an expression like:
(../../page[1]/objectives/objective)[1]
returns without problems the value of the first objective "Objective 1"
Any ideas?
...
<page>
<objectives>
<objective>Objective 1</objective>
<objective>Objective 2</objective>
</objective>
<page>
<page>
<objref num="2"/>
...
</page>
<page>
<objref num="1"/>
...
</page>
...
I need an XPATH expression (1.0 or 2.0) that automatically retrives the contents of the 'objective[n]' element from the 'objref' element for an id="n" ('n' is an integer)
for example if <objref num="1"/> I need the contents inside of the first objective element
Is that possible?
I tried something like this from the 'objref' element:
(../../page[1]/objectives/objective)[@num]
but this does't return anything.
an expression like:
(../../page[1]/objectives/objective)[1]
returns without problems the value of the first objective "Objective 1"
Any ideas?