docs: public static String forXmlTag(String intag) {
          if (XMLChar.isValidName(intag) || intag == null || intag.length() == 0) {
              return intag;
          }
  
          StringBuilder sb = new StringBuilder(intag.length());
          sb.append(intag);
  
          char c;
          for (int i = sb.length() - 1; i >= 0; i--) {
              c = intag.charAt(i);
              if (!XMLChar.isName(c)) {
                  switch (c) {
                      case ' ':
                          sb.setCharAt(i, '_');
                          break;
                      case '<':
                          sb.setCharAt(i, '.');
                          sb.insert(i + 1, "lt.");
                          break;
                      case '>':
                          sb.setCharAt(i, '.');
                          sb.insert(i + 1, "gt.");
                          break;
                      default:
                          sb.setCharAt(i, '.');
                          sb.insert(i + 1, '.');
                          sb.insert(i + 1, Integer.toHexString(c));
                          break;
                  }
              }
          }
          // Make sure the first character is an allowed one
          if (!XMLChar.isNameStart(sb.charAt(0))) {
              sb.insert(0, '_');
          }
  
          return sb.toString();
      }