title: parsing xml data with vb.net
body: <p>I am currently attempting to parse data with VB.net to populate some textboxes selecting by childname "eResponse.01", 02, 03 etc however a namespace / schema location in the main tag seems to be tripping up the code.</p>
  
  <pre><code>    Dim xmlDoc As New XmlDocument()
      xmlDoc.Load("C:\Users\james\Desktop\NEMSIS\EMS\xml\Test.xml")
      Dim xmlns As New XmlNamespaceManager(xmlDoc.NameTable)
      xmlns.AddNamespace("xsi", "http://www1w3.org/2001/XMLSchema-instance")
      xmlns.AddNamespace("schemaLocation", "http://www.nemsis.org http://nemsis.org/media/nemsis_v3/release-3.4.0/XSDs/NEMSIS_XSDs/EMSDataSet_v3.xsd")
      xmlns.AddNamespace("xmlns", "http://www.nemsis.org")
      Dim nodes As XmlNodeList = xmlDoc.DocumentElement.SelectNodes("/EMSDataSet/Header/PatientCareReport/eResponse")
      For Each node As XmlNode In nodes
          TextEdit1.Text = node.SelectSingleNode("eResponse.03").InnerText
      Next
  </code></pre>
  
  <p>works fine when using the following</p>
  
  <pre><code>&lt;EMSDataSet&gt;
  &lt;Header&gt;
      &lt;DemographicGroup&gt;
          &lt;dAgency.01&gt;0&lt;/dAgency.01&gt;
          &lt;dAgency.02&gt;00&lt;/dAgency.02&gt;
          &lt;dAgency.04&gt;49&lt;/dAgency.04&gt;&lt;/DemographicGroup&gt;
      &lt;PatientCareReport&gt;
          &lt;eRecord&gt;
              &lt;eRecord.01&gt;OpP&lt;/eRecord.01&gt;
              &lt;eRecord.SoftwareApplicationGroup&gt;
                  &lt;eRecord.02&gt;G&lt;/eRecord.02&gt;
                  &lt;eRecord.03&gt;Q&lt;/eRecord.03&gt;
                  &lt;eRecord.04&gt;P&lt;/eRecord.04&gt;&lt;/eRecord.SoftwareApplicationGroup&gt;&lt;/eRecord&gt;
          &lt;eResponse&gt;
              &lt;eResponse.AgencyGroup&gt;
                  &lt;eResponse.01&gt;a&lt;/eResponse.01&gt;
                  &lt;eResponse.02&gt;BL&lt;/eResponse.02&gt;&lt;/eResponse.AgencyGroup&gt;
              &lt;eResponse.03&gt;u33&lt;/eResponse.03&gt;
  </code></pre>
  
  <p>however it does not populate anything if I include the namespace/schema</p>
  
  <pre><code>&lt;EMSDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nemsis.org http://nemsis.org/media/nemsis_v3/release-3.4.0/XSDs/NEMSIS_XSDs/EMSDataSet_v3.xsd" xmlns="http://www.nemsis.org"&gt;
  &lt;Header&gt;
      &lt;DemographicGroup&gt;
          &lt;dAgency.01&gt;0&lt;/dAgency.01&gt;
          &lt;dAgency.02&gt;00&lt;/dAgency.02&gt;
          &lt;dAgency.04&gt;49&lt;/dAgency.04&gt;&lt;/DemographicGroup&gt;
      &lt;PatientCareReport&gt;
          &lt;eRecord&gt;
              &lt;eRecord.01&gt;OpP&lt;/eRecord.01&gt;
              &lt;eRecord.SoftwareApplicationGroup&gt;
                  &lt;eRecord.02&gt;G&lt;/eRecord.02&gt;
                  &lt;eRecord.03&gt;Q&lt;/eRecord.03&gt;
                  &lt;eRecord.04&gt;P&lt;/eRecord.04&gt;&lt;/eRecord.SoftwareApplicationGroup&gt;&lt;/eRecord&gt;
          &lt;eResponse&gt;
              &lt;eResponse.AgencyGroup&gt;
                  &lt;eResponse.01&gt;a&lt;/eResponse.01&gt;
                  &lt;eResponse.02&gt;BL&lt;/eResponse.02&gt;&lt;/eResponse.AgencyGroup&gt;
              &lt;eResponse.03&gt;u33&lt;/eResponse.03&gt;
  </code></pre>
  
  <p>what do I need to do to get my code to ignore extra data in the opening tag - removing that information is not an option.</p>