Nbl Bz

Nbl Bz

  • NA
  • 56
  • 12.8k

Load data from XML file in One ListBox

Oct 16 2014 2:40 AM
Hello dear all ,
 Am still working on Forms and C# , I discover a lot of thing but not easy sometimes.

I want to populate data from XML file to a ListBox ,my problem is that i want to populate nodes attributes

exp :
<?xml version="1.0" encoding="UTF-8"?>
<category active="0" attribut1="vrai" titre="aaaaaa">
    <category_value titre="acac">
      <object  background_colour="230" id="0" name="zzzzzz"  type="0">
        <child id="121" x="2" y="0" />
        <child id="131" x="3" y="0" />
      </object>
</category_value>
</<category>

For exp , in my listBox I want to see columns : Category , category_value, object , child
then for the contenant of columns only the attribute Id   or titre  for  Category , category_value.

my code work only when i have simple XML file with data . 
On the internet the code is not simple for me ( a lot of class )

Can u help me plz

Answers (10)