Lire un fichier xml avec listview1
Bonjour,
mon code xml :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| <PlayerSave version="4">
<Tutorial lockedContracts="5" complete="1" playedIntro="City-3" />
...etc
<Intro done="false" scenesPlayed="" npcsMet="" seenConstruction="false" />
<Storage>
<Entity type="1" ID="1194" />
<Entity type="1" ID="1341" />
<Entity type="5" ID="545" count="999997" />
<Entity type="5" ID="543" count="999999" />
<Entity type="5" ID="544" />
<Entity type="5" ID="481" count="999989" />
<Entity type="5" ID="441" count="999995" />
<Entity type="5" ID="425" count="999999" />
<Entity type="5" ID="442" count="999997" />
<Entity type="5" ID="790" count="999999" />
<Entity type="5" ID="799" />
<Entity type="5" ID="614" count="999998" />
<Entity type="5" ID="429" count="999970" />
<Entity type="5" ID="431" count="999966" />
<Entity type="5" ID="457" count="999988" />
<Entity type="15" ID="33" />
<Entity type="5" ID="550" />
</Storage>
<Inventory level="1" type="3" capacity="3" />
<Inventory level="1" type="4" capacity="-1" />
<Inventory level="1" type="2" capacity="2147483647" />
<Inventory level="1" type="1" capacity="2147483647" />
<Inventory level="1" type="0" capacity="-1" /> |
Mon problème c'est comment afficher dans listview1 dans storage tous les count avec son ID.
exemple :
- 545 999997
- 543 999999 ...etc
mon code de lecture :
Code:
1 2 3 4
| For Each Node2 As Xml.XmlElement In document.SelectNodes("/PlayerSave/Storage/Entity")
Dim item As ListViewItem = ListView2.Items.Add(Node2.GetAttribute("ID"))
item.SubItems.Add(Node2.GetAttribute("count"))
Next |
Pouvez-vous me dire comment faire pour afficher dans listview1 tous les count avec son ID?
Merci de votre compréhension,