	public boolean parseDataXML(Reader reader) {
		boolean success = false;
		XmlPullParserFactory factory;
		try {
			factory = XmlPullParserFactory.newInstance();
			XmlPullParser parser = factory.newPullParser();
			parser.setInput(reader);
			boolean done = false;
			do {
				switch (parser.getEventType()){
					case XmlPullParser.START_TAG:
						String tagName = parser.getName();
						if (tagName.equals("area")){
							parser.next();
						}
						else if (tagName.equals("id")) {
							this.mAreaId = Integer.valueOf(parser.nextText()).intValue();
						}
						else if (tagName.equals("name")) {
							this.mAreaName = parser.nextText();
						}
						else if (tagName.equals("desc")) {
							this.mAreaDescription = parser.nextText();
						}
						else if (tagName.equals("version")) {
							this.mAreaVersion = Integer.valueOf(parser.nextText()).intValue();
						}						
						else if (tagName.equals("Ticket")) {
							Ticket t = getTicketFromAttributes(parser);
							this.mAreaTickets.put(t.getId(), t);
							parser.next();
						}
						else if (tagName.equals("Station")) {
							Station s = getStationFromAttributes(parser);
							this.mAreaStations.put(s.getId(), s);
							parser.next();
						}
						else if (tagName.equals("Route")) {
							Route r = getRouteFromAttributes(parser);
							this.mAreaRoutes.put(r.getId(), r);
							parser.next();
						}
						else
							parser.next();
						break;
					case XmlPullParser.END_TAG:
						if (parser.getName().equals("area")){
							done = true;
						}
						else
							parser.next();
						break;
					case XmlPullParser.END_DOCUMENT:
						done = true;
						break;
					default:
						parser.next();
				}
			} while (!done);
			success = true;
		} catch (XmlPullParserException e) {
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		int counter = 0;
		for(Ticket ticket : mAreaTickets.values()){
			if(!ticket.isSuperior()){
				for(Route route : mAreaRoutes.values()){
					if(route.getTicketId() == ticket.getId()
							&& counter < mPathPaints.size())
						route.setPathPaint(mPathPaints.get(counter));
				}
				counter++;
			}
		}
		return success;
	}

	public boolean parseDataXML(Reader reader) {
		boolean success = false;
		XmlPullParserFactory factory;
		try {
			factory = XmlPullParserFactory.newInstance();
			XmlPullParser parser = factory.newPullParser();
			parser.setInput(reader);
			boolean done = false;
			do {
				switch (parser.getEventType()){
					case XmlPullParser.START_TAG:
						String tagName = parser.getName();
						if (tagName.equals("area")){
							parser.next();
						}
						else if (tagName.equals("id")) {
							this.mAreaId = Integer.valueOf(parser.nextText()).intValue();
						}
						else if (tagName.equals("name")) {
							this.mAreaName = parser.nextText();
						}
						else if (tagName.equals("desc")) {
							this.mAreaDescription = parser.nextText();
						}
						else if (tagName.equals("version")) {
							this.mAreaVersion = Integer.valueOf(parser.nextText()).intValue();
						}						
						else if (tagName.equals("Ticket")) {
							Ticket t = getTicketFromAttributes(parser);
							this.mAreaTickets.put(t.getId(), t);
							parser.next();
						}
						else if (tagName.equals("Station")) {
							Station s = getStationFromAttributes(parser);
							this.mAreaStations.put(s.getId(), s);
							parser.next();
						}
						else if (tagName.equals("Route")) {
							Route r = getRouteFromAttributes(parser);
							int stationCount = r.getStationIds().size();
							if (stationCount > 1) {
								this.mAreaRoutes.put(r.getId(), r);
							}
							parser.next();
						}
						else
							parser.next();
						break;
					case XmlPullParser.END_TAG:
						if (parser.getName().equals("area")){
							done = true;
						}
						else
							parser.next();
						break;
					case XmlPullParser.END_DOCUMENT:
						done = true;
						break;
					default:
						parser.next();
				}
			} while (!done);
			success = true;
		} catch (XmlPullParserException e) {
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		int counter = 0;
		for(Ticket ticket : mAreaTickets.values()){
			if(!ticket.isSuperior()){
				for(Route route : mAreaRoutes.values()){
					if(route.getTicketId() == ticket.getId()
							&& counter < mPathPaints.size())
						route.setPathPaint(mPathPaints.get(counter));
				}
				counter++;
			}
		}
		return success;
	}
