Here you can find the source of getRootElement(Document document)
Parameter | Description |
---|---|
document | XML document |
public static Element getRootElement(Document document)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Document; import org.w3c.dom.Element; public class Main { /**/*from w w w .j a v a2 s . c o m*/ * Get root element of XML file * * @param document * XML document * @return The root element of the XML document */ public static Element getRootElement(Document document) { return document.getDocumentElement(); } }