title: Issue in parsing xml using xPathAPI
body: <p>I am trying to parse the following xml, but getting repeated first sub tag [] on each iteration instead of getting the values of next sub tags [i.e ]. Kindly provide your help.</p>
  
  <pre><code>&lt;error_code_rules enabled="true"&gt;
      &lt;errors&gt;
          &lt;error&gt;
              &lt;error_source&gt;ldap&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-1&lt;/oms_error_code&gt;
              &lt;priority&gt;3&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;nagravision&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-2&lt;/oms_error_code&gt;
              &lt;priority&gt;1&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;hitexpress&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-3&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;netinventory&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-4&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;seachangeeventis&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-5&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;embratel&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-6&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;siemens&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-7&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;netsiemens&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-8&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
          &lt;error&gt;
              &lt;error_source&gt;nokiaonends&lt;/error_source&gt;
              &lt;error_code&gt;ALL&lt;/error_code&gt;
              &lt;oms_error_code&gt;OMS-9&lt;/oms_error_code&gt;
              &lt;priority&gt;2&lt;/priority&gt;
          &lt;/error&gt;
      &lt;/errors&gt;
  &lt;/error_code_rules&gt;
  </code></pre>
  
  <p>The code for parsing the xml doc is as follows</p>
  
  <pre><code>private void populateKsuRulesList() {
      logger.trace(3, "Populating ksuRulesList");
      logger.log("populter ksu rule list");
      CachedXPathAPI xPathAPI = new CachedXPathAPI();
      try {
          NodeList components = xPathAPI.eval(doc, KSU_RULES_COMPONENT_PATH)
                  .nodelist();
          logger.log("components.getLength()" + components.getLength());
          for (int i = 0; i &lt; components.getLength(); i++) {
              Node component = components.item(i);
              // NodeIterator nodeItr = xPathAPI.selectNodeIterator(component,
              // KSU_RULES_COMPONENT_CATEGORY_PATH);
              String componentCategory = xPathAPI.eval(components.item(i),
                      KSU_RULES_COMPONENT_CATEGORY_PATH).toString();
              String componentType = xPathAPI.eval(component,
                      KSU_RULES_COMPONENT_TYPE_PATH).toString();
              String mandatory = xPathAPI.eval(component,
                      KSU_RULES_MANDATORY_PATH).toString();
              logger.log("componentCategory" + componentCategory);
              logger.log("componentType" + componentType);
              logger.log("mandatory" + mandatory);
              String ruleParms[] = { componentCategory, componentType,
                      mandatory };
              ksuRulesList.add(ruleParms);
          }
      } catch (TransformerException te) {
          logger.log("Exception: ", te);
      }
  }
  </code></pre>