A
apicard
I have a simple document like this:
<Accept>
<XXXX/>
<Token image="From"/>
<Date value="2007-01-01"/>
<Token image="To"/>
<Date value="2007-01-01"/>
</Accept>
where i want to get the date element following the to token. (from and
to are both optional, so it cannot be only position relative)
I am using the following query: "child::Token[fn:upper-
case(@image)='TO']/following-sibling::*"
but my problem is that it's always returning me the token and the date
element. I would have expected to only get the date element.
For now i changed it to: "child::Token[fn:upper-case(@image)='FROM']/
following-sibling::*[2]" and that works, but I feel like I am missing
something here.
Please help.
Thanks
Alain
<Accept>
<XXXX/>
<Token image="From"/>
<Date value="2007-01-01"/>
<Token image="To"/>
<Date value="2007-01-01"/>
</Accept>
where i want to get the date element following the to token. (from and
to are both optional, so it cannot be only position relative)
I am using the following query: "child::Token[fn:upper-
case(@image)='TO']/following-sibling::*"
but my problem is that it's always returning me the token and the date
element. I would have expected to only get the date element.
For now i changed it to: "child::Token[fn:upper-case(@image)='FROM']/
following-sibling::*[2]" and that works, but I feel like I am missing
something here.
Please help.
Thanks
Alain