code: public String xml(String text) {
          if (text == null || text.isEmpty()) {
              return text;
          }
          return StringEscapeUtils.escapeXml11(text);
      }
docs: XML Encodes the provided text.
  
  @param text the text to encode
  @return the XML encoded text