public static void map2xml(Map<String, String> map) throws DocumentException, IOException {
XStream xstream = new XStream();
String xml = xstream.toXML(map);
System.out.println(xml);
}
很简单,方便。
public static void map2xml(Map<String, String> map) throws DocumentException, IOException {
XStream xstream = new XStream();
String xml = xstream.toXML(map);
System.out.println(xml);
}
很简单,方便。