(String content,String filePath)
| 27 | } |
| 28 | |
| 29 | @Override |
| 30 | public void handle(String content,String filePath) { |
| 31 | log.info("handle ASTXML"); |
| 32 | CompilationUnit cu = parse(content); |
| 33 | XmlPrinter printer = new XmlPrinter(true); |
| 34 | log.info(printer.output(cu)); |
| 35 | FileWriter fileWriter = new FileWriter(filePath); |
| 36 | fileWriter.write(printer.output(cu)); |
| 37 | log.info("write xml file success"); |
| 38 | log.info("Xml file path: "+filePath); |
| 39 | log.info("handle xml end"); |
| 40 | |
| 41 | } |
| 42 | |
| 43 | } |