static @Nullable String filterXMLCharacters(@Nullable String value) {
    if (value == null) {
      return null;
    }

    StringBuilder builder = null;
    for (int i=0; i<value.length();i++) {
      char c = value.charAt(i);
      if (Verifier.isXMLCharacter(c)) {
        if (builder != null) {
          builder.append(c);
        }
      }
      else {
        if (builder == null) {
          builder = new StringBuilder(value.length()+5);
          builder.append(value, 0, i);
        }
      }
    }
    if (builder != null) {
      value = builder.toString();
    }
    return value;
  }
static @Nullable String filterXMLCharacters(@Nullable String value)