/** * Remove comments from XML * * @param document * @throws IOException * @throws DocumentException */ private static void removeComments(Document document) throws IOException, DocumentException { Visitor visitor = new VisitorSupport() { @Override public void visit(Comment comment) { comment.setText(" "); } }; document.accept(visitor); }
public void accept(Visitor visitor) { element.accept( visitor ); }
public void accept(Visitor visitor) { getWrapped().accept(visitor); }
public void accept(Visitor visitor) { target().accept( visitor ); }