Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use a variable in XPath expression?

Status
Not open for further replies.

mheppler

Programmer
Feb 6, 2006
8
0
0
US
public void RemoveDVD (string title)
{
...
strExp = "/DVDs/DVD[Title=title]/Title";
...
}

How can I put variable title into this expression?

Thanks much,
Mark
 
You're going to kick yourself, it's so easy.
Code:
strExp = "/DVDs/DVD[Title=" + title + "]/Title";
Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top