@Override public void endElement(String uri, String localName, String qName) throws SAXException { switch (qName) { // Add the employee to list once end tag is found case "employee": empList.add(emp); break; // For all other end tags the employee has to be updated. case "firstName": emp.firstName = content; break; case "lastName": emp.lastName = content; break; case "location": emp.location = content; break; } }