Can anyone tell me how to parse a local XML file stored in the system using SAX, with an example code? Please also tell me where can I find information on that.
sample code
Create documentBuilderFactory
DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
DocumentBuilder builder=factory. newDocumentBuilder();
//implementing required handlers public class SaxParse extends DefaultHandler{ } //new instance of saxParserFactory SAXParserFactory factory=SAXParserFactory.newInstance(); //NEW INSTANCE OF SAX PARSER SAXParser saxparser=factory.newSAXParser(); //Parsing xml document SAXParser.parse(new File(file to be parsed), new SAXXMLParserImpl());