'Remove all XML element contents and plugins.
Any attribute values will be preserved.'

def clear(self):

    for child in list(self.xml):
        self.xml.remove(child)
    for plugin in list(self.plugins.keys()):
        del self.plugins[plugin]
    return self
