Code example for SAXParseException

		parser.parse(new ByteArrayInputStream(text.getBytes(Charset.availableCharsets().get("UTF-8"))), this);
		if(msg != null) {
			return msg;
		} else { 
			throw new SAXParseException("Invalid XML format...", null);
	private AbstractMessage msg;
	private String currentString;
	private String element;
	private ArrayList<UserLocation> list;
	private UserLocation userLocation;
	private String username;
	private boolean isAccepted;
	private int latitude, longtitude;
	private int gender, bgColor;
	private GeoPoint geoPoint;
Connect your IDE to all the code out there  Get Codota for Java