Here you can find the source of getBooleanAttribute(Element el, String name)
public static boolean getBooleanAttribute(Element el, String name)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { public static boolean getBooleanAttribute(Element el, String name) { String s = el.getAttribute(name); if (s == null || "0".equals(s)) { return false; }//from w w w.j a v a2s . co m if ("1".equals(s)) { return true; } return new Boolean(s).booleanValue(); } }