Raise error when required xml elements are missing.
When parsing make sure that databases contain at least the root group.
Add tests for broken databases.

Make sure we detect the error and don't crash.
Raise error if we don't find exactly one root group.