public static void xml2order() throws Exception { StringBuffer sb = new StringBuffer(); try { BufferedReader br = new BufferedReader(new FileReader("/Users/jy/Downloads/order.xml")); String data = null; // 一次读入一行,直到读入null为文件结束 while ((data = br.readLine()) != null) { sb.append(data); } br.close(); } catch (Exception e) { } System.err.println(ListsuffixResultDeserializer.deserialize(sb.toString(), Order.class)); }
public static RefundRecordV2 xml2refundRecordV2() throws Exception { StringBuffer sb = new StringBuffer(); try { BufferedReader br = new BufferedReader(new FileReader("/Users/jy/Downloads/refund_record2.xml")); String data = null; // 一次读入一行,直到读入null为文件结束 while ((data = br.readLine()) != null) { sb.append(data); } br.close(); } catch (Exception e) { } return ListsuffixResultDeserializer.deserialize(sb.toString(), RefundRecordV2.class); }
public static void xml2refundRecordV3() throws Exception { StringBuffer sb = new StringBuffer(); try { BufferedReader br = new BufferedReader(new FileReader("/Users/jy/Downloads/refund_record3.xml")); String data = null; // 一次读入一行,直到读入null为文件结束 while ((data = br.readLine()) != null) { sb.append(data); } br.close(); } catch (Exception e) { } System.err.println( ListsuffixResultDeserializer.deserialize( sb.toString(), com.foxinmy.weixin4j.payment.mch.RefundRecord.class)); }