- public void startElement(Tree.Element e) { depth++; element = e; }
- public void endElement(Tree.Element e) { depth--; element = e; }
+ public void startElement(Tree.Element e) {
+ if (chars.length() > 0) {
+ queue.append(chars.toString());
+ queue.append(new Integer(depth0));
+ chars.setLength(0);
+ }
+ queue.append(e);
+ queue.append(new Integer(depth0));
+ depth0++;
+ }
+ public void endElement(Tree.Element e) {
+ if (chars.length() > 0) {
+ queue.append(chars.toString());
+ queue.append(new Integer(depth0));
+ chars.setLength(0);
+ }
+ depth0--;
+ }
+ public void whitespace(char[] ch, int s, int l) { characters(ch, s, l); }