title: Changing if else to switch for string
body: <p>How can I write the following method using <code>switch case</code> instead of <code>if else</code></p>
  
  <pre><code>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);
      }
  
  }
  </code></pre>