@Override
	public List<Message> getMessages(String path) {
		File f = new File(path);
		List<Message> messages  = new ArrayList<Message>();
		try {
			Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(f);
			NodeList nodes = doc.getElementsByTagName("message");
			
			for(int i = 0; i< nodes.getLength(); ++i) {
				Element elt = (Element) nodes.item(i);
				DateTime dt = new DateTime(elt.getAttribute("time"));
				
				Message m = new SimpleMessage(elt.getAttribute("sender")
											,elt.getElementsByTagName("div").item(0).getTextContent()
											,dt.toDate());
				
				if(messages.size() > 0 
					&&  m.getSender().equals(
							messages.get(messages.size()-1).getSender()
						)
					) 
				{
					messages.get(messages.size()-1).append(m);
				}
				else
					messages.add(m);
				
			}
			return messages;
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ParserConfigurationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}