Solved

SelectNodes from Textbox Syntax

Posted on 2006-06-28
2
191 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
get row value in vb.net 4 17
VB.NET 2008 Winforms Signing 13 31
"Emulate" TAB key when press Enter Key 3 47
VB.net Duplicating a table - primary key not created 3 32
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

861 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