Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SelectNodes from Textbox Syntax

Posted on 2006-06-28
2
Medium Priority
?
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

596 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