I use this code :
and this is the xml :
Nothing shows up in my listView , any help whould be great . Thank you .
Code:
System.Xml.XmlDocument loadDoc = new System.Xml.XmlDocument();
loadDoc.Load(Application.StartupPath + "\\servers.xml");
foreach (System.Xml.XmlNode ipNode in loadDoc.SelectNodes("/users/profile"))
{
listView1.Items.Add(ipNode.Attributes["ip"].InnerText);
}
foreach (System.Xml.XmlNode serverNode in loadDoc.SelectNodes("/users/profile"))
{
listView1.Items[listView1.Items.Count - 1].SubItems.Add(serverNode.Attributes["server"].InnerText);
}
foreach (System.Xml.XmlNode countryNode in loadDoc.SelectNodes("/users/profile"))
{
listView1.Items[listView1.Items.Count - 1].SubItems.Add(countryNode.Attributes["country"].InnerText);
}
}
PHP Code:
<?xml version="1.0"?>
<users>
<profile ip="212.23.122.45" server="server name1" country="D">
</profile>
<profile ip="212.22.123.122" server="server name2" country="D">
</profile>
</users>
Nothing shows up in my listView , any help whould be great . Thank you .