Code example for SAXParseException

Methods: getExceptiongetMessagegetLineNumbergetSystemId

0
			 
 
		} catch (SAXParseException spe) {
			// Error generated by the parser 
			System.out.println("\n** Parsing error" + ", line "
					+ spe.getLineNumber() + ", uri " + spe.getSystemId());
			System.out.println("   " + spe.getMessage());
 
			// Use the contained exception, if any 
			Exception x = spe;
			if (spe.getException() != null)
				x = spe.getException();
			x.printStackTrace();
 
		} catch (SAXException sxe) {
			// Error generated by this application 
			// (or a parser-initialization error) 
			Exception x = sxe;
			if (sxe.getException() != null)
				x = sxe.getException();
Contextual code suggestions in your IDE  Get Codota for Java