Libdivecomputer always uses metric units internally. But when reverse engineering a device that stores everything using imperial units, it's very convenient to be able to switch the output to imperial units too.
The dive and sample xml tags were not closed properly if an error occurred during parsing.
The XML output format exports all dives to a single xml file.