3

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.

Wayne
  • 6,361
  • 10
  • 46
  • 69

1 Answers1

10

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.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • Oh thanks u. I just use Ctrl-Shift-O and Eclipse imported other Attributes, not org.xml.sax.Attributes. – Wayne Oct 27 '11 at 09:31