Here you can find the source of attributeBooleanGet(Element e, String name, boolean defaultValue)
public static boolean attributeBooleanGet(Element e, String name, boolean defaultValue)
//package com.java2s; /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under * the Apache 2.0 License, see http://coconut.codehaus.org/license. */// w ww .j a va 2s. c o m import org.w3c.dom.Element; public class Main { public static boolean attributeBooleanGet(Element e, String name, boolean defaultValue) { if (!e.hasAttribute(name)) { return defaultValue; } else { return Boolean.parseBoolean(e.getAttribute(name)); } } }