Here you can find the source of getAttributeBoolean(final Element element, final String name)
Parameter | Description |
---|---|
element | Element where to start looking. |
name | Name of the attribute. |
public static final boolean getAttributeBoolean(final Element element, final String name)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Oak Ridge National Laboratory. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ import org.w3c.dom.Element; public class Main { /** Locate attribute tagged 'name', return its boolean value. *//w ww.jav a2 s . com * @param element Element where to start looking. * @param name Name of the attribute. * * @return Returns true if attribute was "true". Defaults to false. */ public static final boolean getAttributeBoolean(final Element element, final String name) { String s = element.getAttribute(name); return s.equalsIgnoreCase("true"); } }