Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot override startElement method

My class extends DefaultHandler. It overrided 3 methods startDocument, EndDocument, EndElement successfully, but when i override StartElement, Eclipse show this error

The method startElement(String, String, String, Attributes) of type SubscriptionHandler must override a superclass method

public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException  
{
//code
}

Please explain this for me. Thanks so much.

like image 478
Wayne Avatar asked Dec 05 '25 10:12

Wayne


1 Answers

Have you imported the right Attributes class? You would see this error if you'd imported any Attributes class other than org.xml.sax.Attributes.

like image 140
Jon Skeet Avatar answered Dec 08 '25 00:12

Jon Skeet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!