Code example for SAXException

Methods: getException

0
			document = builder.parse(file);
			System.out.println("--> Parsed the xml file : " + file);
		} catch (SAXException sxe) {
			// Error generated during parsing 
			Exception x = sxe;
			if (sxe.getException() != null)
				x = sxe.getException();
			x.printStackTrace();
 
		} catch (ParserConfigurationException pce) {
			// Parser with specified options can't be built 
			pce.printStackTrace();
 
		} catch (IOException ioe) {
			// I/O error 
			ioe.printStackTrace();
		} 
				 
		return document;
	}