Here you can find the source of getAttribAsBoolean(Element e, String name, Boolean dft)
public static Boolean getAttribAsBoolean(Element e, String name, Boolean dft)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Element; public class Main { public static Boolean getAttribAsBoolean(Element e, String name) { return getAttribAsBoolean(e, name, false); }/*from w w w.j a v a2s. c om*/ public static Boolean getAttribAsBoolean(Element e, String name, Boolean dft) { if (getAttribute(e, name) == null) return dft; else return Boolean.parseBoolean(getAttribute(e, name)); } public static String getAttribute(Element e, String name) { if (e.getAttribute(name) == null) return ""; return e.getAttribute(name); } }