code: static float getFloatAttribute(Element element, String attr) throws ParsingException {
  		String cx = element.getAttribute(attr);
  		if ((cx == null) || (cx.equals(""))) {
  			cx = element.getAttributeNS(SODIPODI, attr);
  		}
  		
  		try {
  			return Float.parseFloat(cx);
  		} catch (NumberFormatException e) {
  			throw new ParsingException(element, "Invalid value for: "+attr, e);
  		}
  	}
docs: Get a floating point attribute that may appear in either the default or
  SODIPODI namespace
  
  @param element The element from which the attribute should be read
  @param attr The attribute to be read
  @return The value from the given attribute
  @throws ParsingException Indicates the value in the attribute was not a float