Java Utililty Methods XML Attribute Get

List of utility methods to do XML Attribute Get

Description

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

Method

double[]getDoubleArrayTagAttribute(XMLStreamReader xmler, String attribute, double[] defaultValue)
get Double Array Tag Attribute
return getDoubleArrayTagAttribute(xmler, attribute, defaultValue, "\\"); 
doublegetDoubleAttribute(Element element, String name)
get Double Attribute
String s = getTrimmedAttribute(element, name);
return s.isEmpty() ? 0d : Double.parseDouble(s);
doublegetDoubleAttribute(Node n, String s)
get Double Attribute
return Double.parseDouble(getAttribute(n, s));
DoublegetDoubleAttribute(String name, Element el)
Gets the value of the DOM element's attribute with the given name as a Double, or null if the value is not a double.
return stringToDouble(getAttribute(name, el));
doublegetDoubleAttributeValue(Element element, String attribute)
get Double Attribute Value
double ret;
Attr attr = element.getAttributeNode(attribute);
try {
    ret = Double.valueOf(attr.getValue());
} catch (NumberFormatException e) {
    ret = 0d;
return ret;
...
DoublegetDoubleAttributeValue(final Element element, final String attributeName)
Get a double value from an attribute.
if (null == element) {
    return null;
final String str = element.getAttribute(attributeName);
if (str.isEmpty()) {
    return null;
} else {
    return Double.valueOf(str);
...