Code example for SAXException

Methods: printStackTrace

		resultChunk = null;
		try { 
			sp.parse(new InputSource(new StringReader(xml)), this);
		}catch(final SAXException se) {
			resultChunk = null;
			throw new RuntimeException("SaxE: " + se+"\n"+xml);
		}catch (final IOException ie) {
			resultChunk = null;
			throw new RuntimeException("ioe: " + ie);
		return resultChunk;
	public static void parseXMLDocument(String file, PChunkCallback cb) {
		//get a factory 
		ParallelCorpusReader pcr = new ParallelCorpusReader(cb);
		final SAXParserFactory spf = SAXParserFactory.newInstance();
Connect your IDE to all the code out there  Get Codota for Java