Code example for DOMException

Methods: printStackTrace

0
		try { 
			String value;
			value = getSimpleElementValue(doc, elementName);
			return Double.parseDouble(value);
		} catch (DOMException e) {
			e.printStackTrace();
			throw new NoSuchFieldException();
		} 
 
	} 
 
	public static String getSimpleElementValue(Document doc, String elementName)
			throws NoSuchFieldException, DOMException, NullPointerException, 
			IllegalArgumentException { 
		if (doc == null) {
			throw new IllegalArgumentException();
		} 
		NodeList nodeList = doc.getElementsByTagName(elementName);
		if (nodeList == null) {
			throw new NoSuchFieldException();
		}