public static void generateXml(final String excelPath, final String xmlPath) throwsException{//格式化输出 final OutputFormat format =OutputFormat.createPrettyPrint();//指定XML编码 format.setEncoding("UTF-8");//用于指定显示和编码方式 final XMLWriter output = new XMLWriter(newFileWriter(xmlPath), form...
public class XmlStorageUtils { /** * 将对象存储到xml文件之中,形参传入路径s * * @description: * @param: obj path * @return: void * @author * @date: 8:17 2022/5/6 */ public static void convertToXml(Object obj, String path) { try { // 利用jdk中自带的转换类实现 JAXBContext conte...