public static String serializeToString(Document doc){
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  try {
    MaryNormalisedWriter mnw=new MaryNormalisedWriter();
    mnw.output(doc,baos);
  }
 catch (  Exception e1) {
    return "";
  }
  return baos.toString();
}

public static String serializeToString ( Document doc ) { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; try { MaryNormalisedWriter mnw = new MaryNormalisedWriter ( ) ; mnw . output ( doc , baos ) ; } catch ( Exception e1 ) { return "" ; } return baos . toString ( ) ; }
serialize a document to a string .
