1,105,286 Community Members

selecting an attribute in xml file through variable

Member Avatar
saneeha.nust
Light Poster
46 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

The following code line is working fine...

XmlNode sslNode = appHostNode.SelectSingleNode("sites/site[@name = 'www.wow.com']/ftpServer/security/ssl");

Now I want to pass a variable instead of 'www.wow.com'... please guide
how can I do it....

Member Avatar
ChrisHunter
Practically a Master Poster
625 posts since Feb 2011
Reputation Points: 120 [?]
Q&As Helped to Solve: 69 [?]
Skill Endorsements: 15 [?]
Featured
 
1
 

Have you tried:

string variableName;

And using this in-line:

'" + variableName + "'
Member Avatar
saneeha.nust
Light Poster
46 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Thanks alot... It works...

Question Answered as of 2 Years Ago by ChrisHunter
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article