public Set<Contact> xmlToSet() {
		Set<Contact> allContacts = new HashSet<Contact>();
		try{
			XMLInputFactory inputFactory = XMLInputFactory.newInstance();
			InputStream in = new FileInputStream("contacts.xml"); 
			XMLEventReader eventReader = inputFactory.createXMLEventReader(in);
			      // Read the XML document
			Contact person = null;
			String contactName = null;
			int contactId = 0;
			while (eventReader.hasNext()) { //iterate down the xmlevents
		        XMLEvent event = eventReader.nextEvent();
		        if (event.isStartElement()) { //if there is a < then set the event to be < event
		        	StartElement startElement = event.asStartElement();
			          // If we have a item element we create a new item
			        if (startElement.getName().getLocalPart() == (CONTACT)) {
			        	if (event.isStartElement()) {
			        		if (event.asStartElement().getName().getLocalPart().equals(NAME)) {
			        			event = eventReader.nextEvent();
			        			contactName = event.asCharacters().getData();
			        			continue;
			        		}
			        		if (event.asStartElement().getName().getLocalPart().equals(ID)) {
			        			event = eventReader.nextEvent();
			        			contactId = Integer.parseInt(event.asCharacters().getData());
			        			continue;
			        		}
			        		person = new ContactImpl(contactName, contactId);
			        		allContacts.add(person);
			        	}
			        }
		        }  
			}
		}catch(Exception ex){
			ex.printStackTrace();
		}
	    return allContacts;
	}