title: XML child nodes showing up under parent nodes where they don't belong
body: <p>I'm getting some weird results in VB trying to parse an XML file.  I'm trying to parse a list of tags (preceded by the "--") for each display.  Instead, each display section is listing the entire list of tags in the XML file instead of just the tags that are assigned to the display.</p>
  
  <p>This is what I want to get:</p>
  
  <pre><code>C1_L2_4FRAC
  --04PC6016
  --04PC6016TQ
  C1_L2_4TOPPER
  --04PC6400
  --04PC6400TQ
  </code></pre>
  
  <p>This is what I'm getting:</p>
  
  <pre><code>C1_L2_4FRAC
  --04PC6016
  --04PC6016TQ
  --04PC6400
  --04PC6400TQ
  C1_L2_4TOPPER
  --04PC6016
  --04PC6016TQ
  --04PC6400
  --04PC6400TQ
  </code></pre>
  
  <p>Here is the XML sample:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16le"?&gt;
  &lt;DisplaysCfg&gt;
  &lt;DISPLAY NAME="C1_L2_4FRAC"&gt;
    &lt;SYMBOL NAME="PG_ALARMSYMBOL_X2"&gt;
      &lt;POSITION X="180" Y="173"/&gt;
      &lt;ACTION NAME="Load Page" PARAM="PG_ALARMLIST_x2,T=04PC6016,T=04PC6016TQ"/&gt;
      &lt;TAG NAME="04PC6016" INDEX="566" DATA_PROC="Infinet.DCS"/&gt;
      &lt;TAG NAME="04PC6016TQ" INDEX="567" DATA_PROC="Infinet.DOL"/&gt;
      &lt;PARAMS DTLS=" GHOSTCLICKPT = FALSE"/&gt;
    &lt;/SYMBOL&gt;
  &lt;/DISPLAY&gt;
  &lt;DISPLAY NAME="C1_L2_4TOPPER"&gt;
    &lt;SYMBOL NAME="PG_ALARMSYMBOL_X2"&gt;
      &lt;POSITION X="1410" Y="154"/&gt;
      &lt;ACTION NAME="Load Page" PARAM="PG_ALARMLIST_x2,T=04PC6400,T=04PC6400TQ"/&gt;
      &lt;TAG NAME="04PC6400" INDEX="583" DATA_PROC="Infinet.DCS"/&gt;
      &lt;TAG NAME="04PC6400TQ" INDEX="584" DATA_PROC="Infinet.DOL"/&gt;
      &lt;PARAMS DTLS=" GHOSTCLICKPT = FALSE"/&gt;
    &lt;/SYMBOL&gt;
  &lt;/DISPLAY&gt;
  &lt;/DisplaysCfg&gt;
  </code></pre>
  
  <p>And here is the code in question:</p>
  
  <pre><code>For Each displaynode In xmldoc.SelectNodes("/DisplaysCfg")
              Dim screenname As String = ""
              For Each attrib As XmlElement In displaynode
                  screenname = attrib.GetAttribute("NAME")
                  Debug.Print(screenname)
                  For Each symbolnode In displaynode.SelectNodes("./DISPLAY/SYMBOL")
                      For Each tagattrib As XmlElement In symbolnode
                          If tagattrib.Name = "TAG" Then
                              Debug.Print("--" &amp; tagattrib.GetAttribute("NAME"))
                          End If
                      Next
                  Next
              Next
          Next
  </code></pre>
  
  <p>Any clues as to what I'm doing wrong?</p>