Code example for SAXException

0
			tempVal = new StringBuffer();
			langpair = LanguagePair.languageForISO639_1Pair(attributes.getValue("langpair"));
		} else if (qName.equalsIgnoreCase("pdoc")) {
			docName = attributes.getValue("name");
		} else { 
			throw new SAXException("Unknown tag: " + qName);
		} 
	} 
 
	Language lang;
	LanguagePair langpair;
	StringBuffer tempVal;
	String docName;
	int pchunkCount = 0;
	int chunkCount = 0;
	int refAlignCount = 0;
 
	public void characters(char[] ch, int start, int length) throws SAXException {
		if (tempVal != null) tempVal.append(ch,start,length);
	}