Java tutorial
//package com.java2s; import org.w3c.dom.Element; public class Main { public static boolean isAttributeTrue(Element elem, String attribute) { return elem.hasAttribute(attribute) && "true".equals(elem.getAttribute(attribute)); } }