def set_payload(self, payload):
if isinstance(payload, ElementClass):<EOL><INDENT>self._payload = [ XMLPayload(payload) ]<EOL><DEDENT>elif isinstance(payload, StanzaPayload):<EOL><INDENT>self._payload = [ payload ]<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>self._dirty = True<EOL>
Set stanza payload to a single item.

        All current stanza content of will be dropped.
        Marks the stanza dirty.

        :Parameters:
            - `payload`: XML element or stanza payload object to use
        :Types:
            - `payload`: :etree:`ElementTree.Element` or `StanzaPayload`