Java Utililty Methods XML Attribute from Element

List of utility methods to do XML Attribute from Element

Description

The list of methods to do XML Attribute from Element are organized into topic(s).

Method

StringgetValueAttribute(final Node aNode)
Retrieves the value of the value attribute of the supplied Node.
return getNamedAttribute(aNode, VALUE_ATTRIBUTE);
StringgetValueAttributeUri(Element parent, String defaultBaseUri)
get Value Attribute Uri
return getSchemaUri(parent, defaultBaseUri) + ".value";
StringgetValueForAttribute(String attributeName, Node parentNode)
get Value For Attribute
NamedNodeMap attrs = parentNode.getAttributes();
if (attrs == null) {
    return null;
Node attr = attrs.getNamedItem(attributeName);
if (attr != null) {
    return attr.getNodeValue();
} else {
...
StringgetXMLAttribute(Element element, String attrName)
Gets an attribute from an XML element
String attr = element.getAttribute(attrName);
if (attr == null)
    return "";
return attr.trim();
StringgetXMLAttributeValue(Element node, String attributeName)
Get the value of an attribute that belongs to an XML element.
return node.getAttribute(attributeName);
booleangetXMLAttributeValueAsBoolean(Element node, String attributeName)
Get the boolean value of an attribute that belongs to an XML element
return Boolean.parseBoolean(getXMLAttributeValue(node, attributeName));
voidincrementAttributeValue(Node node, String attName)
increment Attribute Value
incrementAttributeValue(node, attName, 1);
booleanisHTMLInputFileValueAttr(Node node, String attrName)
is HTML Input File Value Attr
if (!isHTMLInputFile(node))
    return false;
return attrName.toLowerCase().equals("value");