Get this Document's root node : DOM Tree « XML « Java
- Java
- XML
- DOM Tree
Get this Document's root node
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class Main {
// return this Document's root node
public static Element getRoot(Document doc) {
return doc.getDocumentElement();
} // getRoot(Document(: Element
}
Related examples in the same category