Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8878237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:39:58+00:00 2026-06-14T19:39:58+00:00

I am currently trying to read in an XML node from a filepath which

  • 0

I am currently trying to read in an XML node from a filepath which I pass to my method.

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 & ": " & iterNews.Current.Value)
        End While
    End While

    Return IsitePath
End Function

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:40:00+00:00Added an answer on June 14, 2026 at 7:40 pm

    Try to load your Xml into an XDocument.

    Dim xdoc As XDocument = XDocument.Load("X:\Jacob.Freeman\RTI\TestXML\0001R.xml")
    Dim headerNode = xdoc.Descendants.First(Function(x) x.Name.LocalName = "Header")
    For Each desc In headerNode.Descendants()
      Console.WriteLine(desc.Name.LocalName + ":" + desc.Value)
    Next
    Console.ReadLine()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to read from an xml file which records the jobs
I'm currently trying to READ XML file from the client machine where the user
I have XML string which I am trying to read with code XmlDocument xmlDoc
Im currently trying to read an XML file and populate an observable collection, but
I'm currently trying to read the contents of an XML file into a Map
I am trying to read data from an MS Project XML file. I have
I'm trying to read an xml file into memory, add a node, then write
I am trying to read XML files from different machines, some of these files
I trying to parse a string in an XML node by using an XPath
I'm currently trying to read in an XML file, make some minor changes (alter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.