标签:form ddc data ros depend on() puts 需要 put
//生成XML文件 此方法需要导包<dependency>
// <groupId>org.jdom</groupId>
// <artifactId>jdom2</artifactId>
// <version>2.0.5</version>
// </dependency>
// Element root = new Element("mortgage-list");
// Document document = new Document(root);
// root.addContent(new Element("dywqd").setText("抵押物清单"));
// root.addContent(new Element("sqbh").setText(String.valueOf(collateraListBean.getSqbh())));
// for(CollateraListBean collateraListBean1:collateraListBean.getCollateraListBeanList()){
// Element element = new Element("mortgage");
// element.addContent(new Element("Serial").setText(String.valueOf(collateraListBean1.getSerial())));
// element.addContent(new Element("Proson").setText(String.valueOf(collateraListBean1.getProson())));
// element.addContent(new Element("Bdcqzh").setText(String.valueOf(collateraListBean1.getBdcqzh())));
// element.addContent(new Element("Zl").setText(String.valueOf(collateraListBean1.getZl())));
// element.addContent(new Element("Use").setText(""));
// element.addContent(new Element("Area").setText(String.valueOf(collateraListBean1.getArea())));
// element.addContent(new Element("Remarks").setText(""));
// root.addContent(element);
// }
// root.addContent(new Element("CreateDate").setText(String.valueOf(collateraListBean.getCreateDate())));
// root.addContent(new Element("CreateUser").setText(String.valueOf(collateraListBean.getCreateUserId())));
// Format format = Format.getPrettyFormat(); //使xml文件 缩进效果
// XMLOutputter xmlout = new XMLOutputter(format);
// String result = xmlout.outputString(document);
byte[] data = xml.getBytes("UTF-8"); //不生成文件,直接返回页面下载
标签:form ddc data ros depend on() puts 需要 put
原文地址:https://www.cnblogs.com/dylan402/p/11444621.html