code: public static String encodeXml(String payload) throws AlipayApiException {
          Element root = createRootElement(XMLConstants.XML_NS_PREFIX);
          root.appendChild(root.getOwnerDocument().createTextNode(payload));
          return childNodeToString(root.getFirstChild());
      }
docs: Encode the XML payload to legality character.
  
  @param payload the XML payload to encode
  @return the encoded XML payload
  @throws ApiException problem encoding the XML payload