docs: public static String unescapeXml(String s) {
  
          initializeEscapeMap();
  
          /*
           * we can't escape the string if the pattern doesn't compile! (but that
           * should never happen since the pattern is static)
           */
          if (!initializeUnescapePattern()) {
              return s;
          }
  
          if (s == null || s.length() == 0) {
              return s;
          }
  
          /*
           * skip this expensive check entirely if there are no substrings
           * resembling Unicode escape sequences in the string to be unescaped
           */
          if (s.contains("\\u")) {
              StringBuffer sUnescaped = new StringBuffer();
              Matcher m = unescapePattern.matcher(s);
              while (m.find() == true) {
                  String slashes = m.group(1);
                  String digits = m.group(3);
                  int escapeCode;
                  try {
                      escapeCode = Integer.parseInt(digits, 16);
                  } catch (NumberFormatException nfe) {
                      /*
                       * the static regular expression string should guarantee
                       * that this exception is never thrown
                       */
                      System.err.println("Impossible error: escape sequence '" + digits + "' is not a valid hex number!  "
                              + "Exception: " + nfe.toString());
                      return s;
                  }
                  if (slashes != null && slashes.length() % 2 == 0 && isInvalidXMLCharacter(escapeCode)) {
                      Character escapedSequence = Character.valueOf((char) escapeCode);
                      /*
                       * slashes are apparently escaped when the string buffer is
                       * converted to a string, so double them to make sure the
                       * correct number appear in the final representation
                       */
                      m.appendReplacement(sUnescaped, slashes + slashes + escapedSequence.toString());
                  }
              }
              m.appendTail(sUnescaped);
              s = sUnescaped.toString();
          }
          return StringEscapeUtils.unescapeXml(s);
      }