docs: public static void escapeXML(String text, Writer writer) throws IOException
    {
      if(text == null) {
        return;
      }
      for(int i = 0, l = text.length(); i < l; ++i) {
        char c = text.charAt(i);
        switch(c) {
        case '"':
          writer.write("&quot;");
          break;
        case '\'':
          writer.write("&apos;");
          break;
        case '&':
          writer.write("&amp;");
          break;
        case '<':
          writer.write("&lt;");
          break;
        case '>':
          writer.write("&gt;");
          break;
        default:
          writer.write(c);
        }
      }
    }