docs: public static String escapeXML(String text)
    {
      StringWriter writer = new StringWriter();
      try {
        escapeXML(text, writer);
      }
      catch(IOException e) {
        // there is no reason for IO exception on a string writer
        throw new BugError("IO failure while attempting to write to string.");
      }
      return writer.toString();
    }