PojoXML JAVABean 与XML相互转换的工具,有点像XMLBean。但是更轻量级。
示例代码:
POJO Class public class Employee{ private String name; private int age; public String getName(){ return name; } public int getAge(){ return age; } .............. .............. .............. }
生成的XML:
<?xml version="1.0" encoding="UTF-8"?> <Employee> <name>test</name> <age>22</age> </Employee>