How can I write the following method using switch case instead of if else
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException
{
currentElement = true;
if (localName.equals("maintag"))
{
/** Start */
sitesList = new SitesList();
} else if (localName.equals("website")) {
/** Get attribute value */
String attr = attributes.getValue("category");
sitesList.setCategory(attr);
}
}