Code example for Document

Methods: getDocumentElement

0
		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 
	 *