Here you can find the source of getXMLAttributeValueAsBoolean(Element node, String attributeName)
Parameter | Description |
---|---|
node | XML element |
attributeName | Name of the boolean attribute |
public static boolean getXMLAttributeValueAsBoolean(Element node, String attributeName)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { /**/*from w ww. j a va2 s . com*/ * Get the boolean value of an attribute that belongs to an XML element * * @param node * XML element * @param attributeName * Name of the boolean attribute * @return */ public static boolean getXMLAttributeValueAsBoolean(Element node, String attributeName) { return Boolean.parseBoolean(getXMLAttributeValue(node, attributeName)); } /** * Get the value of an attribute that belongs to an XML element. * * @param node * XML element * @param attributeName * Name of the attribute * @return */ public static String getXMLAttributeValue(Element node, String attributeName) { return node.getAttribute(attributeName); } }