default handler in sax parser
Default handler in sax parser in java is use to provide default implementation of ContentHandler interface and we have to implement DefaultHandler interface to read the XML file data.
DefaultHandler has some pre-defined method that we have to override to read the XML file data.
Default Handler Methods
- startDocument() : It will invoked at starting of XML file.
- endDocument() : It will be invoked when end of the XML reached.
- startElement() : It will be called at the beginning of an element.
- endElement() : It will be called at the end of an element.
- characters() : It will be called with the text contents in between the start and end tags of an XML document element.