code: public float getFloat(String attrName) {
          BigDecimal bd = getNumber(attrName);
          if (bd == null)
              throw new NumberFormatException
                  ("value of " + attrName + " is null");
          return bd.floatValue();
      }
docs: Returns the value of the specified attribute in the current item as a
  <code>float</code>.
  
  @see #isNull(String) #isNull(String) to check if the attribute value is
  null.
  @see #isPresent(String) #isPresent(String) to check if the attribute
  value is present.
  
  @throws NumberFormatException
  if the attribute value is null or not a valid representation
  of a {@code BigDecimal}.