docs: def save(self, pretty=True):
          """ Save the xml. Make pretty if necessary. """
          self.endInstance()
          if pretty:
              _indent(self.root, whitespace=self._whiteSpace)
          tree = ET.ElementTree(self.root)
          tree.write(self.path, encoding="utf-8", method='xml', xml_declaration=True)
          if self.logger:
              self.logger.info("Writing %s", self.path)