/** * Leave enclosing element */ @Override void leaveEnclosingElement() throws IOException { depthCounter.decLevel(); if(tagQ.size() == 0) throw new IOException("Tried to exit non-existent enclosing element " + "in EditLog file"); EditsElement element = tagQ.pop(); printIndents(); write("</" + element.toString() + ">\n"); }
/** * Visit an enclosing element (element that cntains other elements) * * @param value a Token to visit */ @Override void visitEnclosingElement(Tokenizer.Token value) throws IOException { printIndents(); write("<" + value.getEditsElement().toString() + ">\n"); tagQ.push(value.getEditsElement()); depthCounter.incLevel(); }