title: parsing Xml with NodeList and DocumentBuilder
body: <p>Having a bit of trouble parsing xml with dom and DocumentBuilder. I'm able to get it working, but I guess I get a bit confused with all the child nodes, etc. </p>
  
  <p>Here's the XML I'm working with:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LabTests&gt;
      &lt;LabTest type="specialty" name="Anti-FXa activity" id="antiFXa" order="16"&gt;
          &lt;values unit="U/mL" default="N/A"&gt;
              &lt;value type="increased" val="0"&gt;
                  &lt;conditions&gt;
                      &lt;condition&gt;Heparin effect&lt;/condition&gt;
                  &lt;/conditions&gt;
              &lt;/value&gt;
              &lt;value type="normal" val=""&gt;
                  &lt;conditions&gt;&lt;/conditions&gt;
              &lt;/value&gt;
              &lt;value type="decreased" val=""&gt;
                  &lt;conditions&gt;&lt;/conditions&gt;
              &lt;/value&gt;
          &lt;/values&gt;
      &lt;/LabTest&gt;
      &lt;LabTest type="general" name="aPTT" id="aPTT" order=""&gt;
          &lt;values unit="secs" default="N/A"&gt;
              &lt;value type="increased" val=""&gt;
                  &lt;conditions&gt;
                      &lt;condition&gt;Acquired hemophilia&lt;/condition&gt;
                      &lt;condition&gt;Acquired vWD&lt;/condition&gt;
                      &lt;condition&gt;DIC&lt;/condition&gt;
                      &lt;condition&gt;Dysfibrinogenemia&lt;/condition&gt;
                      &lt;condition&gt;FI deficiency&lt;/condition&gt;
                      &lt;condition&gt;FII deficiency&lt;/condition&gt;
                      &lt;condition&gt;FII/IIa inhibitors&lt;/condition&gt;
                      &lt;condition&gt;FIX deficiency&lt;/condition&gt;
                      &lt;condition&gt;FIX inhibitors&lt;/condition&gt;
                      &lt;condition&gt;FV deficiency&lt;/condition&gt;
                      &lt;condition&gt;FV inhibitors&lt;/condition&gt;
                      &lt;condition&gt;FVIII deficiency&lt;/condition&gt;
                      &lt;condition&gt;FX deficiency&lt;/condition&gt;
                      &lt;condition&gt;FX inhibitors&lt;/condition&gt;
                      &lt;condition&gt;FXI deficiency&lt;/condition&gt;
                      &lt;condition&gt;FXI inhibitors&lt;/condition&gt;
                      &lt;condition&gt;FXII deficiency&lt;/condition&gt;
                      &lt;condition&gt;FXII inhibitors&lt;/condition&gt;
                      &lt;condition&gt;Heparin effect&lt;/condition&gt;
                      &lt;condition&gt;Liver disease effect&lt;/condition&gt;
                      &lt;condition&gt;Lupus anticoagulant&lt;/condition&gt;
                      &lt;condition&gt;Monoclonal gammopathy&lt;/condition&gt;
                      &lt;condition&gt;Vitamin K deficiency&lt;/condition&gt;
                      &lt;condition&gt;vWD type 1&lt;/condition&gt;
                      &lt;condition&gt;vWD type 2&lt;/condition&gt;
                      &lt;condition&gt;vWD type 3&lt;/condition&gt;
                      &lt;condition&gt;Warfarin effect&lt;/condition&gt;
                  &lt;/conditions&gt;
              &lt;/value&gt;
              &lt;value type="normal" val=""&gt;
                  &lt;conditions&gt;
                      &lt;condition&gt;DIC&lt;/condition&gt;
                      &lt;condition&gt;Dysfibrinogenemia&lt;/condition&gt;
                      &lt;condition&gt;FVII deficiency&lt;/condition&gt;
                      &lt;condition&gt;FXIII deficiency&lt;/condition&gt;
                      &lt;condition&gt;FVII inhibitors&lt;/condition&gt;
                      &lt;condition&gt;Liver disease effect&lt;/condition&gt;
                      &lt;condition&gt;Lupus anticoagulant&lt;/condition&gt;
                      &lt;condition&gt;Monoclonal gammopathy&lt;/condition&gt;
                      &lt;condition&gt;Vitamin K deficiency&lt;/condition&gt;
                      &lt;condition&gt;vWD type 1&lt;/condition&gt;
                      &lt;condition&gt;vWD type 2&lt;/condition&gt;
                      &lt;condition&gt;vWD type 3&lt;/condition&gt;
                      &lt;condition&gt;Warfarin effect&lt;/condition&gt;
                  &lt;/conditions&gt;
              &lt;/value&gt;
              &lt;value type="decreased" val=""&gt;
                  &lt;conditions&gt;
                      &lt;condition&gt;DIC&lt;/condition&gt;
                  &lt;/conditions&gt;
              &lt;/value&gt;
          &lt;/values&gt;
      &lt;/LabTest&gt;
  &lt;/LabTests&gt;
  </code></pre>
  
  <p>what I'm trying to do is grab hold of each <code>LabTest</code> element and, within each of those elements, grab hold of the <code>value</code> elements (and grab the value of <code>type</code>) and, within the <code>value</code> element, grab hold of all of the <code>condition</code> elements. </p>
  
  <p>In the end, I want something like a <code>Map&lt;String, HashMap&lt;String, ArrayList&lt;String&gt;&gt;</code>, where the <code>String</code> is the <code>LabTest</code> name and the <code>HashMap</code> uses the <code>type</code> (e.g. <code>decreased</code>, <code>increased</code>, etc) for the key and then fills up the ArrayList with the conditions for that <code>value</code> type. </p>
  
  <p>Confusing enough? </p>
  
  <p>Basically, I just need an example, I think, of how to loop through and grab each LabTest with its "value" elements, and each of the "condition" elements under those "value" elements. </p>