1.代码实现
/**
* <dependency>
* <groupId>dom4j</groupId>
* <artifactId>dom4j</artifactId>
* <version>1.6.1</version>
* </dependency>
* <dependency>
* <groupId>com.alibaba</groupId>
* <artifactId>fastjson</artifactId>
* <version>1.2.83</version>
* </dependency>
*/
import java.io.File;
import java.io.IOException;
impo