| Author: Kunal 30 Sep 2009 | Member Level: Gold | Rating:  Points: 2 |
define a method which take two args (1 nad 2 ) in that method call the method that u r using for single call 2 times and get the results to use
public string GetBoth(int code1, int code2) { StringBuilder str=new StringBuilder (); str.Append(call method with "//City[Code =code1]/Market"); str.Append(" and ");
str.Append(call method with "//City[Code =code2]/Market"); return str.ToString(); }
Happy Programming Kunal Don't forget to rate the response...
|
| Author: Rajeswari 30 Sep 2009 | Member Level: Gold | Rating:   Points: 3 |
First you can get whole City tag using xpath query... they enumerate the recored and compare and get back the result
|
| Author: Chandra Shekar.Y 15 Oct 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi
Generate an xpath with the parameters you pass seperated by or and use SelectNodes which returns the Code nodes from the city.
eg: //City[Market = '1' or Market='2']/Code
Or
string.Format("//City[Market='{0}' or Market='{2}']/Code", variable1, variable2)
here variable1 contains value 1 and variable2 contains value 2.
Hope this helps you.
|