/* $Id: TextSearchSax.java 125 2011-03-09 09:49:51Z ohura $ */
package smart_gs.text_search;

import org.xml.sax.*;
import org.xml.sax.helpers.*;

public class TextSearchSax extends DefaultHandler {
	private String planeText = "";

	public void startDocument() throws SAXException {
		System.out.println("start of XML document...");
	}
	
	public void endDocument() throws SAXException {
		System.out.println("end of XML document");
	}
	
	public void startElement() throws SAXException {
		System.out.println("start of XML element...");
	}
	
	public void endElement() throws SAXException {
		System.out.println("start of XML element...");
	}
	
	public void characters(char[] ch, int start, int length) {
    System.out.println(new String(ch, start, length)); 
    planeText += new String(ch, start, length);
    } 
	
	public String getPlaneText(){
		return planeText;
	}
}
