def as_xml(self):
result = Stanza.as_xml(self)<EOL>if self._subject:<EOL><INDENT>child = ElementTree.SubElement(result, self._subject_tag)<EOL>child.text = self._subject<EOL><DEDENT>if self._body:<EOL><INDENT>child = ElementTree.SubElement(result, self._body_tag)<EOL>child.text = self._body<EOL><DEDENT>if self._thread:<EOL><INDENT>child = ElementTree.SubElement(result, self._thread_tag)<EOL>child.text = self._thread<EOL><DEDENT>return result<EOL>
Return the XML stanza representation.

        Always return an independent copy of the stanza XML representation,
        which can be freely modified without affecting the stanza.

        :returntype: :etree:`ElementTree.Element`