title: How to avoid a lot of if else conditions
body: <p>I have read a lot of topics about code refactoring and avoiding of if else statements. Actually, I have a class where I am using a lot of if - else conditions.</p>
  <p>More details: I am using the pull parser and on each line of my soap response, I will check if there is a tag I am interested on, if not, check another tag etc:</p>
  <pre><code> if(eventType == XmlPullParser.START_TAG) {
              soapResponse= xpp.getName().toString();
              
              if (soapResponse.equals(&quot;EditorialOffice&quot;)){  
                  eventType = xpp.next();
                  if (xpp.getText()!=null){
                  editorialOffice += xpp.getText();
                  }
              }   
              else if (soapResponse.equals(&quot;EditorialBoard&quot;)){  
                  eventType = xpp.next();
                  if (xpp.getText()!=null){
                  editorialBoard += xpp.getText();
                  }
              }
              else if (soapResponse.equals(&quot;AdvisoryBoard&quot;)){  
                  eventType = xpp.next();
                  if (xpp.getText()!=null){
                  advisoryBoard += xpp.getText();
                  }
              }   
          }
          eventType = xpp.next();
       }
  </code></pre>
  <p>Now, I would like to use something else, instead of those if else conditions, but I don't know what.</p>
  <p>Can you please give me an example?</p>