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 ( ) ) ; }
Encode the XML payload to legality character .