@Override
	public void startElement(String uri, String localName, String qName,
			Attributes atts) throws SAXException {

		if (localName.equals("li")) {
			isInLi = true;
			currentKeep = new Keep();
		} else if (localName.equals("a")){
			isInA = true;
			if (isInLi) {
				if (atts.getLocalName(0).equals("id") ) {
					currentKeep.setId(atts.getValue(0));
				} 
				if (atts.getLocalName(1).equals("href") ) {
					String href = atts.getValue(1);
					if (!href.equals("#" + currentKeep.getId())) {
						currentAlliance = new Alliance();
						currentAlliance.setName(href.split(".p6\\=",2)[1]);
					}

				}
			}
		} else if (localName.equals("span")){
			isInSpan = true;
			if(isInLi && isInA){
				if(atts.getLocalName(0).equals("class")){
					Faction faction = null;

					if (atts.getValue(0).equals("mid")) {
						faction = Faction.Midgard;
					} else if (atts.getValue(0).equals("hib")) {
						faction = Faction.Hibernia;
					} else if (atts.getValue(0).equals("alb")) {
						faction = Faction.Albion;
					}
					if (faction != null){
						currentKeep.setFaction(faction);
					}
				}
			}
		} else if (localName.equals("b")){
			isInB = true;

		} else if (localName.equals("img")){
			isInImg = true;
			if(currentAlliance != null && isInLi && isInA && isInSpan){
				if(atts.getLocalName(0).equals("src")){
					currentAlliance.setEmblemeUrl(atts.getValue(0));
				}
			}
		} 



	}