parsing Xml with NodeList and DocumentBuilder and getting values
<p>I've followed almost all of the SO questions and answers, some make sense while others don't, i'm able to get some of my xml working some of the time.  At this point I have a hobbled gob of nothing.  </p>

<p>Below is my xml that i am trying work with</p>

<pre><code>&lt;GET_GUESS_CHART&gt;
    &lt;sort_by_letter&gt;
        &lt;letter_row&gt;
            &lt;letter&gt;A&lt;/letter&gt;
            &lt;guess&gt;16&lt;/guess&gt;
            &lt;rank&gt;3&lt;/rank&gt;
        &lt;/letter_row&gt;
        &lt;letter_row&gt;
            &lt;letter&gt;B&lt;/letter&gt;
            &lt;guess&gt;5&lt;/guess&gt;
            &lt;rank&gt;1&lt;/rank&gt;
        &lt;/letter_row&gt;
    &lt;/sort_by_letter&gt;
    &lt;sort_by_rank&gt;
        &lt;letter_row&gt;
            &lt;letter&gt;A&lt;/letter&gt;
            &lt;guess&gt;16&lt;/guess&gt;
            &lt;rank&gt;1&lt;/rank&gt;
        &lt;/letter_row&gt;
        &lt;letter_row&gt;
            &lt;letter&gt;E&lt;/letter&gt;
            &lt;guess&gt;15&lt;/guess&gt;
            &lt;rank&gt;2&lt;/rank&gt;
        &lt;/letter_row&gt;
    &lt;/sort_by_rank&gt;
&lt;/GET_GUESS_CHART&gt;
</code></pre>

<p>I want to loop through the document and loop through 'sort_by_letters' and 'sort_by_rank' and get values for each 'letter_row'.</p>

<p>Here is how i get the document:</p>

<pre><code> URL url = new URL(Url[0]);
            DocumentBuilderFactory dbf = DocumentBuilderFactory
                    .newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            // Download the XML file
            Document doc = db.parse(new InputSource(url.openStream()));
            doc.getDocumentElement().normalize();
</code></pre>

<p>I'm able to actually get the document, but for the life of me can not figure how to work it to get what i need.</p>