I can not override the startElement method of the superclass although I inherit it. SAX emphasizes ...

@Override: method doesn’t override or implement a method from a supertype.

 import org.xml.sax.helpers.DefaultHandler; public class SAXPars extends DefaultHandler{ @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { ThisElement = qName; System.out.println("Start El"); } } 

With other methods it turns out.

    1 answer 1

    The method signature is valid, so make sure you import the correct Attributes class. Must be org.xml.sax.Attributes .