recover collection.id when opening empty collection.json
draft of code for adding xpath tags (and parents) to XML if absent

Like the XML equivalent of mkdir -p.
NOTE: Does not handle attributes yet.