Java tutorial
//package com.java2s; import org.xml.sax.Attributes; public class Main { public static final boolean getBooleanAttribute(final Attributes pAttributes, final String pAttributeName, final boolean pDefaultValue) { final String value = pAttributes.getValue("", pAttributeName); return (value != null) ? Boolean.parseBoolean(value) : pDefaultValue; } }