public static String parseRuleDescription(String xmlRule)
	{

		String ruleDescription = "";

		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
		try 
		{
			DocumentBuilder db = dbf.newDocumentBuilder();
			Reader reader=new CharArrayReader(xmlRule.toCharArray());
			Document document = db.parse(new org.xml.sax.InputSource(reader));


			//Take all the nodes "condition"
			NodeList list = document.getElementsByTagName("CONDITION_PART");
			if (list.getLength()>0)
			{
				//It has a complex condition

				for (int i=0; i<list.getLength(); i++)
				{
					Node condition_part = list.item(i);


					//Paint first condition children (this is always a leaf)
					NodeList children = condition_part.getChildNodes();
					int j=0; 
					while(children.item(j).getNodeType()!=Node.ELEMENT_NODE)
						j++;

					//paintLeafCondition(children.item(j));
					ruleDescription += getLeafCondition(children.item(j));

					//Paint AND/OR operator
					NodeList siblings = condition_part.getParentNode().getChildNodes();
					j=0; 
					while(siblings.item(j).getNodeType()!=Node.ELEMENT_NODE)
						j++;
					//System.out.println(siblings.item(j).getTextContent());
					ruleDescription+= siblings.item(j).getTextContent() +"\n";

					//Paint the second children, but only in the case is a simple one (only the last one is a leaf)

					//If it is the last "condition_part" node, it means this is the second children which is leaf
					if (i==(list.getLength()-1))
					{
						NodeList lastConditions = condition_part.getChildNodes();
						//Paint the second children leaf
						Node lastCondition = lastConditions.item(lastConditions.getLength()-1);
						//paintLeafCondition(lastCondition);
						ruleDescription+= getLeafCondition(lastCondition);
					}
				}

			}else{
				//It has a simple condition
				//In this case, we just need to take the node condition
				NodeList conditions = document.getElementsByTagName("CONDITION");

				//There should be only one, but just in case
				for (int i=0; i<conditions.getLength(); i++)
				{
					Node leafCondition = conditions.item(i);
					ruleDescription = getLeafCondition(leafCondition);
					//this.retrieveRuleDescription.setText(this.paintLeafCondition(leafCondition));

				}
			}

			return ruleDescription;


		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}	

		
	}