Given
<nodeList>
<crazyNode>Data to be overwrited</crazyNode>
<simpleNode>Normal data</simpleNode>
<crazyNode>Actual data</crazyNode>
</nodeList>
I want to get the last crazyNode
(the one which contains Actual data).
I know how to access the first node, for example:
nodeList.crazyNode[0]
And I guess a solution would be
nodeList.crazyNode[nodeList.crazyNode.length() - 1]
But for some reason I don't like doing that, too verbose and maybe there's a method more elegant.
Thanks