Here you can find the source of getDocument(Document document)
private static Node getDocument(Document document)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { /***********************************************************************/ private static Node getDocument(Document document) { return document != null ? document.getChildNodes().item(0) : null; }/* w w w. j av a 2s . c om*/ }