hi, im trying to display the attribute name of the parent node once the input matches a town name:
my xml is:
my xml is:
mallow bandon bray youghal fermoy
and method is:
-
private void btnGetNum_Click(object sender, EventArgs e)
-
- {
- XmlNodeList towns = doc.GetElementsByTagName("town");
- foreach (XmlNode town in towns)
- {
- if (txtInput.Text.Equals(town.ChildNodes[0].Value))
- {
- lstResult.Items.Add("area code is" + ??????????);
- }
- }
Suthish NairPosted Feb 17, 2011, 4:07 PM