Code example for Element

Methods: getElementCount

0
	 */ 
	public ParseResult parse(RSyntaxDocument doc, String style) {
 
		result.clearNotices();
		Element root = doc.getDefaultRootElement();
		result.setParsedLines(0, root.getElementCount()-1);
 
		if (spf==null || doc.getLength()==0) {
			return result;
		} 
 
		try { 
			SAXParser sp = spf.newSAXParser();
			Handler handler = new Handler(doc);
			DocumentReader r = new DocumentReader(doc);
			InputSource input = new InputSource(r);
			sp.parse(input, handler);
			r.close();
		} catch (SAXParseException spe) {
			// A fatal parse error - ignore; a ParserNotice was already created. 
Contextual code suggestions in your IDE  Get Codota for Java