Gets attribute value as integer.
@param attributeName Attribute name
@return Attribute value as integer or 0 if not set.
768659
public final int getAttributeValueAsInteger(String attributeName) {
    Attribute attribute = getAttribute(attributeName);
    if (attribute == null) {
      return 0;
    }
    else {
      try {
        return attribute.getIntValue();
      }
      catch (DataConversionException ex) {
        return 0;
      }
    }
  }
1010874
public String get(String attributeName) {
        // check first for a namespace-less attribute
        String attr = attributes.get(new XAttributeName(attributeName, null, null));
        if (attr == null) {
            // find any attribute ignoring namespace
            for (XAttributeName n : attributes.keySet()) {
                if (Objects.equals(n.name, attributeName)) {
                    return attributes.get(n);
                }
            }
        }
        return attr;
    }
1049942
public static final int getInt(String value)
   {
      return (value == null || value.length() == 0 ? 0 : Integer.parseInt(value));
   }
543764
public int getInt(String name) throws JSONException {
		Object object = get(name);
		Integer result = JSON.toInteger(object);
		if (result == null) {
			throw JSON.typeMismatch(name, object, "int");
		}
		return result;
	}
968147
public String get(String attributeName, String attributeNamespace) {
        return attributes.get(new XAttributeName(attributeName, attributeNamespace, null));
    }
45696
public Attribute getAttribute(String name)
  {
    ArrayList<Attribute> attributeList = getAttributeList();
    
    for (int i = attributeList.size() - 1; i >= 0; i--) {
      Attribute attr = attributeList.get(i);

      if (attr.getName().equals(name))
        return attr;
    }

    return null;
  }
1119193
@Override
    public Object getAttributeValue(String name) {
        final List<Object> values = this.getAttributeValues(name);
        if (values != null && values.size() > 0) {
            return values.get(0);
        }

        return null;
    }
138508
@Override
    public String getValue(String xmlName) {
        int index = getIndex(xmlName);

        if (index < 0) {
            return null;
        }
        return getValue(index);
    }
645524
@Override
    public int getIndex(String xmlName) {
        int length = getLength();

        for (int i = 0; i < length; i++) {
            if (getQName(i).equals(xmlName)) {
                return i;
            }
        }
        return -1;
    }
1311167
@Api
	public void getValue(String name, IntegerAttribute attribute) {
		attribute.setValue(toInteger(formWidget.getValue(name)));
	}
988669
public Attribute getAttribute4Attribute(final String _attributeName)
    {
        final OneSelect oneselect = this.attr2OneSelect.get(_attributeName);
        return oneselect == null ? null : oneselect.getAttribute();
    }
254992
static String getAttributeValue(Element element, String name) {
        Attr attribute = element.getAttributeNode(name);
        if (attribute == null) {
            return null;
        } else {
            return attribute.getValue();
        }
    }
450478
public Attribute getAttributeByName(String name) {
		for (Attribute a : attributes)
			if (name.equals(a.getName()))
				return a;
		return null;
	}
729753
public static String getAttributeValueOrNull(final Node elementNode, final String attrName)
    {
        if (null == elementNode || null == elementNode.getAttributes())
        {
            return null;
        }

        final Node attrNode = elementNode.getAttributes().getNamedItemNS(null, attrName);
        if (null == attrNode)
        {
            return null;
        }

        return attrNode.getNodeValue();
    }
1128841
@Override
  public Object get(String attributeName) {
    if (cachedValueMap == null) {
      cachedValueMap = new LinkedHashMap<>();
    }

    Object value;
    if (cachedValueMap.containsKey(attributeName)) {
      value = cachedValueMap.get(attributeName);
    } else {
      Integer col = colNamesMap.get(attributeName);
      if (col != null) {
        Cell cell = row.getCell(col);
        if (cell != null) {
          value = ExcelUtils.toValue(cell, cellProcessors);
        } else {
          value = null;
        }
      } else {
        value = null;
      }

      cachedValueMap.put(attributeName, value);
    }
    return value;
  }
469246
public static String getAttributeValue(final Node elementNode, final String attrName, final String defValue)
    {
        final Node attrNode = elementNode.getAttributes().getNamedItemNS(null, attrName);

        if (attrNode == null)
        {
            return defValue;
        }

        return attrNode.getNodeValue();
    }
121277
public Attribute attribute(int indexAttribute) {
        if (this.attributes == null) {
            //All attributes are numeric
            return defaultNumericAttribute();
        }
        int location = locateIndex(indexAttribute);
        if (location == -1) {
            //if there is not attribute information, it is numeric
            return defaultNumericAttribute();
        }
        return attributes[location];
    }