Solved

SelectNodes from Textbox Syntax

Posted on 2006-06-28
2
188 Views
Last Modified: 2010-04-23
Simple Question,
I have the following code, and instead of searching for "111-11-1111" number, I would like it to search from whatever information has been inputed into textbox1.text
This is really simple but I couldnt get it to work. I tried putting in ("//SSN[. = 'ssnBox.Text']/parent::node()/FirstName" however It did not work.

        Dim SSNList As System.Xml.XmlNodeList
        Dim node As System.Xml.XmlNode

        SSNList = xDoc.SelectNodes("//SSN[. = '111-11-1111']/parent::node()/FirstName")
        For Each node In SSNList
            System.Diagnostics.Debug.WriteLine(node.InnerText)
        Next
0
Comment
Question by:JasonWinn
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 17004930
You need to use:

    SSNList = xDoc.SelectNodes("//SSN[. = '" & ssnBox.Text & "']/parent::node()/FirstName")
0
 
LVL 3

Author Comment

by:JasonWinn
ID: 17004937
Thanks alot carl_tawn!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now