List of utility methods to do XML Attribute Get
String | getBeanclassAttribute(Node node) get Beanclass Attribute if (node != null) { NamedNodeMap attributes = node.getAttributes(); Node beanclassAttribute = attributes.getNamedItem("beanclass"); if (beanclassAttribute != null) { return beanclassAttribute.getNodeValue(); return null; ... |
boolean | getBool(Element el, String attrName, boolean defaultValue) get Bool if (el.hasAttribute(attrName)) return Boolean.parseBoolean(el.getAttribute(attrName)); return defaultValue; |
Boolean | getBoolAttribute(NamedNodeMap namedNodeMap, String name) get Bool Attribute String value = getAttribute(namedNodeMap, name); if (value == null) { return null; } else { return Boolean.valueOf(value); |
boolean | getBoolAttribute(Node node, String attr) get Bool Attribute return getBoolAttribute(node, attr, false);
|
boolean | getBoolAttribute(Node node, String name) get Bool Attribute return Boolean.parseBoolean(getAttribute(node, name));
|
boolean | getBoolAttribute(Node node, String name, boolean defVal) get Bool Attribute String att = getAttribute(node, name); if (att == null) return defVal; return Boolean.parseBoolean(att); |
boolean | getBoolean(Element element, String attribute, boolean defaultValue) get Boolean String theValue = element.getAttribute(attribute); if (StringUtils.hasText(theValue)) { return Boolean.valueOf(theValue); return defaultValue; |
boolean | getBooleanAttr(Element element, String name) get Boolean Attr String attr = element.getAttribute(name); boolean ret = attr.equalsIgnoreCase("true"); return ret; |
boolean | getBooleanAttrib(Element element, String attribName, String namespaceURI) Get a boolean attribute from the supplied element. String attribVal = element.getAttributeNS(namespaceURI, attribName); return (attribVal != null ? attribVal.equalsIgnoreCase("true") : false); |
boolean | getBooleanAttribute(Element e, String name) Helper to get an attribute if it exists or return null. String val = getAttribute(e, name); return Boolean.parseBoolean(val); |