When I use SimpleXML it puts newer nodes at the end of the file.

Assuming my file is large (think massive and growing) what is the best way to get the last n nodes.

For example:

<topic title="epic 129109 page post race">
<post date="ages-ago">First!</post>
...
<post date="seconds-ago">Thank you for that</post>
<post date="just-now">No, thank you.</post>
</topic>

I don't want to kill my poor server by asking it to foreach through a growing set if I can skip to the last n nodes.

The question is how do I do this?