title: How to get element's value from XML using SAX parser in startElement?
body: <p>Is it possible to get the content of an element from a XML file in <code>startElement</code> function that is the override function of the SAX handler?</p>
  
  <p>Below is the specification.</p>
  
  <p><strong>1) XML file</strong></p>
  
  <pre><code>&lt;employees&gt;
     &lt;employee id="111"&gt;
        &lt;firstName&gt;Rakesh&lt;/firstName&gt;
        &lt;lastName&gt;Mishra&lt;/lastName&gt;
        &lt;location&gt;Bangalore&lt;/location&gt;
     &lt;/employee&gt;
     &lt;employee id="112"&gt;
        &lt;firstName&gt;John&lt;/firstName&gt;
        &lt;lastName&gt;Davis&lt;/lastName&gt;
        &lt;location&gt;Chennai&lt;/location&gt;
     &lt;/employee&gt;
     &lt;employee id="113"&gt;
        &lt;firstName&gt;Rajesh&lt;/firstName&gt;
        &lt;lastName&gt;Sharma&lt;/lastName&gt;
        &lt;location&gt;Pune&lt;/location&gt;
     &lt;/employee&gt;
  &lt;/employees&gt;
  </code></pre>
  
  <p><strong>2) <code>startElement</code> function</strong></p>
  
  <pre><code>@Override
  public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
      .......code in here..........
  }
  </code></pre>
  
  <p><strong>3) Expected result</strong></p>
  
  <pre><code>element name   : employee
  attribute name : id
  attribute value: 111
  firstName      : Rakesh
  lastName       : Mishra
  location       : Bangalore
  
  element name   : employee
  attribute name : id
  attribute value: 112
  firstName      : John
  lastName       : Davis
  location       : Chennai
  
  element name   : employee
  attribute name : id
  attribute value: 113
  firstName      : Rajesh
  lastName       : Sharma
  location       : Pune
  </code></pre>