private static void parseCriteria(Element attrElem, ChartData chartData, AttributeData parentAttr, HashMap<String, Color> colorMap) 
                throws IOException {
        try {
            if (attrElem.getAttribute("type").equals("abstract")) {
                AttributeAbstractData attr = new AttributeAbstractData();
                attr.setName(attrElem.getAttribute("name"));
                NodeList nList = attrElem.getChildNodes();
                for (int i = 0; i < nList.getLength(); i++) {
                    Node node = nList.item(i);
                    if (node.getNodeType() == Node.ELEMENT_NODE) {
                        parseCriteria((Element)node, chartData, attr, colorMap);
                    }
                }
                chartData.addAttributeData(parentAttr, attr);
            } 
            else {
                AttributePrimitiveData attr = new AttributePrimitiveData();
                attr.setName(attrElem.getAttribute("name"));
                attr.setWeight(Double.parseDouble(attrElem.getAttribute("weight")));
                attr.setColor(colorMap.get(attr.getName()));
//                if (attrElem.getElementsByTagName(XML_DESCRIPTION).getLength() > 0) {
//                    String htmlText = StringEscapeUtils.unescapeJava(
//                            attrElem.getElementsByTagName(XML_DESCRIPTION).item(0).getTextContent());
//                    
//                    Pattern pat = Pattern.compile("<html>");
//                    Matcher mat = pat.matcher(htmlText);
//                    int start = -1;
//                    if(mat.find())
//                        start = mat.start();
//                    
//                    pat = Pattern.compile("</html>");
//                    mat = pat.matcher(htmlText);
//                    int end = -1;
//                    if(mat.find())
//                        end = mat.start();
//                    
//                    htmlText = htmlText.substring(start, end + 7);
//                    
//                    attr.setDescription(htmlText);
//                }
                
                Element domainElem = (Element) attrElem.getElementsByTagName(XML_DOMAIN).item(0);
                if (domainElem.getAttribute("type").equals("continuous"))
                    attr.setUnitsName(domainElem.getAttribute("unit"));
                attr.setDomain(parseDomain(domainElem));
                chartData.addAttributeData(parentAttr, attr);
            }
        } catch (IOException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new IOException(attrElem.getUserData(PositionalXMLReader.LINE_NUMBER).toString());
        }
    }