@Override
	public void endElement(String uri, String localName, String qName)
			throws SAXException {
		
		if(!open_tag.equals(qName)){
			throw new SAXParseException("XML malformed, missmatched '"+ open_tag +"' tag in XML file." , null);
		}
		
		switch (qName) {
			case "color":
				this.color = new BeadColor(this.code, 
											this.name, 
											this.red, 
											this.green, 
											this.blue, 
											this.alpha);
				this.pallete.add(this.color);
				open_tag="pallete";
			break;
			
			case "pallete":
				open_tag = null;
			break;
			
			case "red":
			case "green":
			case "blue":
			case "alpha":
				open_tag = "values";
			break;
			
			default:
				open_tag="color";
		}
	}