Mega Code Archive

 
Categories / Java Tutorial / XML
 

Get this Documents 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      }