legacy/src/main/java/thredds/catalog/InvCatalogFactory.java
public String writeXML(InvCatalogImpl catalog) throws IOException {
    ByteArrayOutputStream os = new ByteArrayOutputStream(10000);
    writeXML(catalog, os, false);
    return new String(os.toByteArray(), CDM.utf8Charset);
  }
public String writeXML(InvCatalogImpl catalog) throws IOException {
    ByteArrayOutputStream os = new ByteArrayOutputStream(10000);
    writeXML(catalog, os, false);
    return new String(os.toByteArray(), CDM.utf8Charset);
  }
Write the catalog as an XML document to a String.

@param catalog write this catalog
@return string containing XML representation
@throws IOException on write error