Hi,
I have a listbox control. How can I bind the listbox to an element of xml
I want to bind the list panel control to the "id" element in the xml.
<Accounts>
<Account>
<id>Test</id>
<Password>PwdTest</Password>
<Previliges>
<Options>0</Options>
<Users>1</Users>
</Previliges>
</Account>
<Account>
<id>Test</id>
<Password>PwdTest</Password>
<Previliges>
<Controls>0</Controls>
<Options>0</Options>
</Previliges>
</Account>
</Accounts>

binding listbox to xml element
LHammer
ds.ReadXml("data.xml");
listBox1.DataSource = ds.Tables[0];
listBox1.DisplayMember = "id";This might not me the most resource-friendly technique if the XML file is very large because the whole file is kept in memory in the form of a DataSet, which isn't exactly petite itself.