code: def to_xml(self):
          
          element = etree.Element(self._tag_name)
          struct_to_xml(element, [
              {"text": self.raw_content},
              {"guid": self.guid},
              {"author": self.handle},
              {"public": "true" if self.public else "false"},
              {"created_at": format_dt(self.created_at)},
              {"provider_display_name": self.provider_display_name},
          ])
          return element
docs: Convert to XML message.