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 ( ) ; }
Retrieve a string representation of the message in PresentationML .