Menu

#2 last() -1 returns last element

open
nobody
None
5
2011-08-05
2011-08-05
sulc
No

calling /root/node[last()]/@id does not work as expected. /root/node[last() - 1]/@id returns last element.

xml:
<root>
<node @id = '0001'>
...
</node>
...
<node @id = '0005'>
...
</node>
</root>

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.