title: Java - parse xml string with variable tagnames?
body: <p>I'm trying to parse an XML string, and the tagnames are variable; I haven't seen any examples on how to pull the information out without knowing them.  For example, I will always know the <code>&lt;response&gt;</code> and <code>&lt;data&gt;</code> tags below, but what falls inside/outside of them could be anything from <code>&lt;employee&gt;</code> to you name it.  </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
       &lt;response&gt; 
          &lt;generic&gt;
             ....
          &lt;/generic&gt;   
          &lt;data&gt;
               &lt;employee&gt;
                  &lt;name&gt;Seagull&lt;/name&gt;
                  &lt;id&gt;3674&lt;/id&gt;
                  &lt;age&gt;34&lt;/age&gt;
               &lt;/employee&gt;
               &lt;employee&gt;
                  &lt;name&gt;Robin&lt;/name&gt;
                  &lt;id&gt;3675&lt;/id&gt;
                  &lt;age&gt;25&lt;/age&gt;
               &lt;/employee&gt;
         &lt;/data&gt;
     &lt;/response&gt;
  </code></pre>