Java tutorial
//package com.java2s; import org.w3c.dom.Element; public class Main { public static Boolean getAttributeBooleanValue(Element element, String attributeName) { String stringValue = getAttributeStringValue(element, attributeName); return Boolean.parseBoolean(stringValue); } public static String getAttributeStringValue(Element element, String attributeName) { return element.getAttribute(attributeName); } }