private void parseDocument() {
		
		//get a factory
		SAXParserFactory spf = SAXParserFactory.newInstance();
		try {
		
			//get a new instance of parser
			SAXParser sp = spf.newSAXParser();
			
			//parse the file and also register this class for call backs
			try {
				
				sp.parse(xmlfile, this);
				
			} catch(FileNotFoundException fnf) {
				System.out.println("\nFile not found.");
			}
		
		}catch(SAXParseException spe) {
			System.out.println("\nParse Exception (Invalid file).");
			spe.printStackTrace();
		}catch(SAXException se) {
			se.printStackTrace();
		}catch(ParserConfigurationException pce) {
			pce.printStackTrace();
		}catch(IOException ie) {
			System.out.println("\nInvalid file.");
		}
	}