code: @Override
      public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
          XmlStringBuilder xml = new XmlStringBuilder(this);
          xml.rightAngleBracket();
          // Loop through all the bodies and append them to the string buffer
          for (CharSequence body : getBodies()) {
              xml.append(body);
          }
          xml.closeElement(this);
          return xml;
      }
docs: Returns the XML representation of a XHTML extension according the specification.
  
  Usually the XML representation will be inside of a Message XML representation like
  in the following example:
  <pre>
  &lt;message id="MlIpV-4" to="gato1@gato.home" from="gato3@gato.home/Smack"&gt;
  &lt;subject&gt;Any subject you want&lt;/subject&gt;
  &lt;body&gt;This message contains something interesting.&lt;/body&gt;
  &lt;html xmlns="http://jabber.org/protocol/xhtml-im"&gt;
  &lt;body&gt;&lt;p style='font-size:large'&gt;This message contains something &lt;em&gt;interesting&lt;/em&gt;.&lt;/p&gt;&lt;/body&gt;
  &lt;/html&gt;
  &lt;/message&gt;
  </pre>