code: public static boolean isXHTMLMessage(Message message) {
          return message.getExtension(XHTMLExtension.ELEMENT, XHTMLExtension.NAMESPACE) != null;
      }
docs: Returns true if the message contains an XHTML extension.
  
  @param message the message to check if contains an XHTML extension or not
  @return a boolean indicating whether the message is an XHTML message