Code example for Document

Methods: getElementsByTagName

0
	 */ 
	public void initialise() { 
		// Get the enabled element value 
		String enabledString = null;
		String subscriberFilter = null;
		enabledString = configurationDocument.getElementsByTagName("enabled").item(0).getTextContent();
		if(enabledString.trim().length() != 0 && enabledString.toLowerCase().startsWith("y")) {
			enabled = true;
		} 
		setEnabled(enabled);
		 
		// Get the filter element value 
		subscriberFilter = configurationDocument.getElementsByTagName("filter").item(0).getTextContent();
		if(subscriberFilter.trim().length() == 0) {
			subscriberFilter = null;
		} 
		setSubscriberFilter(subscriberFilter); 
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java