CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Posts
    3

    Question Infinite Loop in For oXMLobject.selectNodes when migrate to VB.NET

    I used the VS2005 migration wizard to migrate a VB6 program to VB.Net. The following snippets of the For loop codes executes once through the loop in VB6, but was in the infinite loop when the codes were migrated to VB.NET. Any suggestion would be appreciated.

    Private oXMLobject As New MSXML2.DOMDocument

    Dim objNode As MSXML2.IXMLDOMNode
    Dim versionInfo As String

    versionInfo = ""

    oXMLobject = Nothing
    oXMLobject = New MSXML2.DOMDocument40
    oXMLobject.async = False
    oXMLobject.Load(tramFlNm)

    For Each objNode In oXMLobject.selectNodes("trademark-applications-daily/version")

    versionInfo = objNode.xml

    Next objNode

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Infinite Loop in For oXMLobject.selectNodes when migrate to VB.NET

    Search and you shall find:

    http://www.codeproject.com/KB/cpp/parsefilecode.aspx

    The wizard is only about 90% useful, and doesn't do 100% conversion, as you may have realized.

    Odds are you can do things a lot better using net then the wizard will do for you.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured