title: VB - Issue using XPath reading an XML
body: <p>I am currently trying to read in an XML node from a filepath which I pass to my method. </p>
  
  <pre><code>Public Function ReadXMLForIsite(xmlFileName As String)
      Dim IsitePath As String
      Dim doc As New XPathDocument(xmlFileName)
      Dim nav As XPathNavigator
      Dim iter As XPathNodeIterator
  
      nav = doc.CreateNavigator
      iter = nav.Select("GovTalkMessage/Header") 'Node name
      'Loop through the records in that node
      While iter.MoveNext
          Dim lstNav As XPathNavigator
          'Get the data we need from the node
          Dim iterNews As XPathNodeIterator
          lstNav = iter.Current
          iterNews = lstNav.SelectDescendants(XPathNodeType.Element, False)
          'Loop through the child nodes
          While iterNews.MoveNext
              Debug.WriteLine(iterNews.Current.Name &amp; ": " &amp; iterNews.Current.Value)
          End While
      End While
  
      Return IsitePath
  End Function
  </code></pre>
  
  <p>Every time i run this method (even with different node names) the variable 'iter' states that 'debugger display proxy is a type and cannot be used as an expression'. This occurs just before the while statement, therefore does not go in. Any help would be much appreciated. Thanks!</p>