code: public String getPresentationML() throws IllegalStateException {
      if (messageML == null) {
        throw new IllegalStateException("The message hasn't been parsed yet. "
            + "Please call MessageMLContext.parse() first.");
      }
  
      ByteArrayOutputStream bout = new ByteArrayOutputStream();
      XmlPrintStream out = new XmlPrintStream(bout);
  
      out.setNoIndent(true);
      out.setNoNl(true);
  
      messageML.asPresentationML(out);
  
      out.close();
  
      return bout.toString();
    }
docs: Retrieve a string representation of the message in PresentationML.
  @throws IllegalStateException thrown if the message hasn't been parsed yet