public List<Element> collectChildren(int level, Node node) {
   Collector<Element> collector = new Collector<Element>();
   iTextContext().pushElementConsumer(collector);
   for (Node child : node.getChildren()) {
     process(level + 1, child);
   }
   iTextContext().popElementConsumer();
   return collector.getCollected();
 }
 public void processChildren(int level, Node node) {
   for (Node child : node.getChildren()) {
     process(level + 1, child);
   }
 }