Started the actual saving of the xml document and its basic structure.