title: Loop Through Specific XML Node and Update VB.NET
body: <p>I have some XML formatted like this:</p>
  
  <pre><code>&lt;PolicyInput&gt;
    &lt;Header&gt;
      ....
    &lt;/Header&gt;
    &lt;Policies&gt;
      &lt;Policy&gt;
        &lt;PolicyRecordNumber&gt;1&lt;/PolicyRecordNumber&gt;
        &lt;PCAdjustment&gt;
          ....
        &lt;/PCAdjustment&gt;
      &lt;/Policy&gt;
      &lt;Policy&gt;
        &lt;PolicyRecordNumber&gt;1&lt;/PolicyRecordNumber&gt;
        &lt;PCAdjustment&gt;
          ....
        &lt;/PCAdjustment&gt;
      &lt;/Policy&gt;
      &lt;Policy&gt;
        &lt;PolicyRecordNumber&gt;1&lt;/PolicyRecordNumber&gt;
        &lt;PCNewBusiness&gt;
          ....
        &lt;/PCNewBusiness&gt;
      &lt;/Policy&gt;
    &lt;/Policies&gt;
    &lt;Trailer&gt;    
      &lt;PolicyRecordCount&gt;1&lt;/PolicyRecordCount&gt;
    &lt;/Trailer&gt;
  &lt;/PolicyInput&gt;  
  </code></pre>
  
  <p>I wish to loop through and update each <code>PolicyRecordNumber</code> element in a <code>For Each</code> statement and then update the final <code>PolicyRecordCount</code> element with the final <code>PolicyRecordNumber</code> value.  So, basically, I will update each <code>PolicyRecordNumber</code> with <code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, <code>5</code> and then <code>5</code> would be my <code>PolicyRecordCount</code> at the end.</p>
  
  <p>How would I do this with VB.NET, as the XML is already formed within the application at this point.</p>