286287288289290291292293294295
if (stack.empty()) { root = elt; } else { final XMLElement top = (XMLElement) stack.peek(); top.addChild(elt); } stack.push(elt); } }