1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| SAXParserFactory sax=SAXParserFactory.newInstance(); InputStream inputStream=getResources().openRawResource(R.raw.sax); SAXParser saxParser= sax.newSAXParser(); saxParser.parse(inputStream,new DefaultHandler(){ @Override public void startDocument() throws SAXException { super.startDocument(); }
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { super.startElement(uri, localName, qName, attributes); }
@Override public void endElement(String uri, String localName, String qName) throws SAXException { super.endElement(uri, localName, qName); }
@Override public void endDocument() throws SAXException { super.endDocument(); }
@Override public void characters(char[] ch, int start, int length) throws SAXException { super.characters(ch, start, length); } });
|