By tex under keepassx
If you happend to run into the unpleasant situation of having multiple diverged KeePassX files, have a look at KpxMerge.
This is a small utility I’ve hacked to help with merging several KeePassX XML exports.