Code example for Document

Methods: getDocumentElement

		DocumentBuilder builder;
		try { 
			builder = factory.newDocumentBuilder();
			Document doc = builder.parse(is);			
			this.root = (Element) doc.getDocumentElement();
		}catch(ParserConfigurationException e) {			
		}catch(IOException e){
			throw new SAXException(e);
	 * Return a node that represents the first matched tag. 
	 * A dummy node is returned if none found. 
	 * @param tag tag name 
	 * @return the xml dom 
Connect your IDE to all the code out there  Get Codota for Java