Java DOM edit: Delete the First Child of the Root Node
public void deleteFirstElement(Document doc) { Element root = doc.getDocumentElement(); Element child = (Element)root.getFirstChild(); root.removeChild(child); }