docs: public static String escapeXml(String orig) {
          return StringGroovyMethods.collectReplacements(orig, new Closure<String>(null) {
              public String doCall(Character arg) {
                  switch (arg) {
                      case '&':
                          return "&amp;";
                      case '<':
                          return "&lt;";
                      case '>':
                          return "&gt;";
                      case '"':
                          return "&quot;";
                      case '\'':
                          return "&apos;";
                  }
                  return null;
              }
          });
      }