def METHOD_NAME(self, output=None):
    """Write XML data to filename, or other stream."""
    self._set_elements()
    if not output:
        output = open(self.filename,'w')
    self.xml.writexml(output, "", " "*4, "\n")
    output.METHOD_NAME('')
    return self