ArrayList<Map<ASTNode, Object>> analysisResult = AnalysisPluginsManager.analyse(cu);
for(int i=0; i < analysisResult.size(); i++)
extFuncs.setAnalysisResult(i, analysisResult.get(i));
XmlVisitor visitor = new XmlVisitor();
cu.accept(visitor);
func.setNodeMapping(visitor);
String xmlDoc = Utils.print(visitor.getDocument());
XdmNode sourceDoc = builder.build(new DOMSource(visitor.getDocument())); // builder.build(new