Here you can find the source of getElementBooleanValue(Element element, String attribute)
public static boolean getElementBooleanValue(Element element, String attribute)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { public static boolean getElementBooleanValue(Element element, String attribute) { return getElementBooleanValue(element, attribute, false); }/*from ww w. ja va2s . c om*/ public static boolean getElementBooleanValue(Element element, String attribute, boolean defaultValue) { if (!element.hasAttribute(attribute)) return defaultValue; return Boolean.valueOf(getElementStringValue(element, attribute)).booleanValue(); } public static String getElementStringValue(Element element, String attribute) { return element.getAttribute(attribute); } }