'Free all data structures used during DOM construction.'

def reset(self):

    self.document = theDOMImplementation.createDocument(EMPTY_NAMESPACE, None, None)
    self.curNode = self.document
    self._elem_info = self.document._elem_info
    self._cdata = False
    return
