protected void pushElement(final Element element) {
    if (atRoot) {
      currentDocument.setRootElement(element); // XXX should we use a
      // factory call?
      atRoot = false;
    }
    else {
      factory.addContent(currentElement, element);
    }
    currentElement = element;
  }
protected void pushElement(final Element element)