### Question:
XmlUtil { public static String toXml(String root, Map<String, String> body) { if (body == null) return ""; return body.keySet().stream().map(key -> { return "<" + key + ">" + body.get(key) + "</" + key + ">"; }).collect(Collectors.joining("", "<" + root + ">", "</" + root + ">")); }  static Map<String, String> fromXml(String content); static Map<String, String> fromXml(InputStream in); static String toXml(String root, Map<String, String> body);  }### Answer:
@Test public void testToXml() { Map<String, String> body = new HashMap<>(2,1); body.put("return_code", "<![CDATA[SUCCESS]]>"); body.put("return_msg", "<![CDATA[OK]]>"); System.out.println(XmlUtil.toXml("xml", body)); }