Impl DocumentBuilder.newDocument() and Document.appendChild()
Added Document.save(File,encoding)