/** * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) */ public void startElement( String uri, String localName, String qName, Attributes attributes) throws SAXException { super.startElement(uri, localName, qName, attributes); Handlerstack.push(currenthandler); if (currenthandler == null) { currenthandler = defaulthandler; } else { currenthandler = currenthandler.nextHandler(localName); } //process Elements. if (!localName.equals(currenthandler.getName())) { throw new SAXException("Unknown tag:" + localName); } currenthandler.startElement(); currenthandler.handleAttributes(attributes); }