Java tutorial
//package com.java2s; import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { public static Node getRootNodeFromDocument(Document document) { return document.getDocumentElement(); } }