I have next xml:
<Histories>
<History>
<Date>2011.11.11 08:45</Date>
<Action>Add</Action>
</History>
<History>
<Date>2011.11.12 08:45</Date>
<Action>Modify</Action>
</History>
<History>
<Date>2011.11.13 08:45</Date>
<Action>Delete</Action>
</History>
<History>
<Date>2011.11.14 08:45</Date>
<Action>Add</Action>
</History>
<History>
<Date>2011.11.15 08:45</Date>
<Action>Modify</Action>
</History>
<History>
<Date>2011.11.16 08:45</Date>
<Action>Delete</Action>
</History>
<History>
<Date>2011.11.17 08:45</Date>
<Action>Add</Action>
</History>
<History>
<Date>2011.11.18 08:45</Date>
<Action>Modify</Action>
</History>
<History>
<Date>2011.11.19 08:45</Date>
<Action>Delete</Action>
</History>
<History>
<Date>2011.12.20 08:45</Date>
<Action>Modify</Action>
</History>
</Histories>
I need to get last node with Action (Add/Modify/Delete). How can I do?
Example:
Add 2011.11.17 08:45
Modify 2011.12.20 08:45
Delete 2011.11.19 08:45
I do: /Histories/History/Action[text()='Add']/../../History[position()=last()] - it do not work.
Thanks