System.err.println("getting attribute ("+attribute+")");
    public static double parseElement(Attribute attribute, String elementName)        throws IllegalArgumentException    {        if(attribute == null || elementName == null)        {            throw new IllegalArgumentException("Null parameters at " +                "AbstractHeatMapMode.parseElement(Attribute,String)");        }                int index = 0;        while((index = elementName.indexOf(".")) != -1)        {            String child = elementName.substring(0,index);            attribute = attribute.getAttributeElement(child);            elementName = elementName.substring(index+1);        }        try        {            double val = attribute.getDoubleElement(elementName).doubleValue();            return val;        }        catch(NullPointerException npe)        {            System.err.println("invalid element parsed: "+elementName);            return Double.NaN; // might not be the right thing to do        }        catch(ClassCastException cce)        {            System.err.println("invalid element parsed:"+elementName);            return Double.NaN; // might not be the right thing to do        }    }