<items> < i want to bind the item 2 name in list box my c# <pre lang="c#"> private void cmbecg_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cmbecg.SelectedIndex == 1) { XmlDocument xdoc = new XmlDocument(); xdoc.Load(@"F:\tuner4tronics\t4tdevicedescriptor\t4tdevicedescriptor\ecgdiscription.xml"); XmlNodeList ecglistfeatures = xdoc.SelectNodes("items/item/features/name"); if (lst1.Items.Count == 0) { foreach (XmlNode name in ecglistfeatures) { lst1.Items.Add(name.InnerText.Trim()); } } } else if (cmbecg.SelectedIndex == 2) !!!!!!here i want to bind item 2 name !!!!!!! { lst1.Items.Clear(); XmlDocument xdoc = new XmlDocument(); xdoc.Load(@"F:\tuner4tronics\t4tdevicedescriptor\t4tdevicedescriptor\ecgdiscription.xml"); XmlNodeList ecglistfeatures = xdoc.SelectNodes("items/item/attribute[id='2']/name"); if (lst1.Items.Count == 0) { foreach (XmlNode name in ecglistfeatures) { lst1.Items.Add(name.InnerText.Trim()); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)