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