public void duplicatePerson(Document doc) { Element root = doc.getDocumentElement(); Element origPerson = (Element)root.getFirstChild(); Element newPerson = (Element)origPerson.cloneNode(true); root.appendChild(newPerson); }