I'm running on Ubuntu 18.04. A Python 2 or 3 solution would be preferred. I've got xml structured like so:
<Records>
<Record>
<recID>123</recID>
<tstamp>2018-12-31T23:59:42.38Z</tstamp>
</Record>
<Record>
<recID>456</recID>
<tstamp>2018-10-10T12:03:02.28Z</tstamp>
</Record>
<Record>
<recID>789</recID>
<tstamp>2018-11-11T13:50:00.00Z</tstamp>
</Record>
</Records>
But I've got a lot of it, a single 10GB file worth. I'm looking for the most efficient way to sort the records on tstamp, such that the output would look like this:
<Records>
<Record>
<recID>456</recID>
<tstamp>2018-10-10T12:03:02.28Z</tstamp>
</Record>
<Record>
<recID>789</recID>
<tstamp>2018-11-11T13:50:00.00Z</tstamp>
</Record>
<Record>
<recID>123</recID>
<tstamp>2018-12-31T23:59:42.38Z</tstamp>
</Record>
</Records>
Thanks in advance.