@Override
	public void endElement(String uri, String localName, String qName)
			throws SAXException {

		if (localName.equals("li")) {
			isInLi = false;
		} else if (localName.equals("a")){
			if(currentAlliance != null){
				currentKeep.setAlliance(currentAlliance);
			}
			isInA = false;
		} else if (localName.equals("span")){
			if(isInLi && isInA){
				System.out.println(currentCharacters.toString());
				String[] keepInfo = ((currentCharacters.split(".\\(",2))[1].split("\\)",2));
				isRelicKeep = keepInfo[0].contains("Relickeep");
				if (isRelicKeep){
					keepInfo = ((currentCharacters.split(".\"",2))[1].split("\"",2));
					String homeRelic = keepInfo[0];
					keepInfo = (keepInfo[1]).split("\\.",2);
					String homeRelicInfo = keepInfo[0].replace("\n", "").replaceAll("\\s{2,}", "");
					List<String> ownedRelics = new LinkedList<String>();
					if(homeRelicInfo.equals("is on its place")){
						ownedRelics.add(homeRelic);
					}
					if (keepInfo[1].contains("Captured relics:")){

						keepInfo = keepInfo[1].replaceAll("\\n", "").split("\\s{2,}");
						boolean isInForeignRelics = false;
						for(String info : keepInfo){
							if(isInForeignRelics && !info.isEmpty()){
								ownedRelics.add(info);
							}
							isInForeignRelics = (info.equals("Captured relics:")|isInForeignRelics);


						}
					}
					//here are all owned relics in the ownedRelcis List
					
				}
				
			}
			isInSpan = false;
		} else if (localName.equals("b")){
			if(isInLi && isInA && isInSpan){
				currentKeep.setName(currentCharacters.replace("\n", "").replaceAll("\\s{2,}", ""));
			}
			isInB = false;
		} else if (localName.equals("img")){
			isInImg = false;
		} 


	}