code: public static String xmlToHtml(String payload, File xsltFile)
   throws AlipayApiException {
          String result = null;
  
          try {
              Source template = new StreamSource(xsltFile);
              Transformer transformer = TransformerFactory.newInstance()
                      .newTransformer(template);
  
              Properties props = transformer.getOutputProperties();
              props.setProperty(OutputKeys.OMIT_XML_DECLARATION, LOGIC_YES);
              transformer.setOutputProperties(props);
  
              StreamSource source = new StreamSource(new StringReader(payload));
              StreamResult sr = new StreamResult(new StringWriter());
              transformer.transform(source, sr);
  
              result = sr.getWriter().toString();
          } catch (TransformerException e) {
              throw new AlipayApiException("XML_TRANSFORM_ERROR", e);
          }
  
          return result;
      }
docs: Transforms the XML content to XHTML/HTML format string with the XSL.
  
  @param payload the XML payload to convert
  @param xsltFile the XML stylesheet file
  @return the transformed XHTML/HTML format string
  @throws ApiException problem converting XML to HTML