Answers for "ReadNode xml vb.net"

0

ReadNode xml vb.net

private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
   string propertyid = listView1.SelectedItems[0].Text;
   XmlDocument doc = new XmlDocument();
   doc.Load(@"http://myUrl.com/Default.xml");

   XmlNodeList nodes = doc.SelectNodes("document/Clients/Client/properties/Property");

   foreach(XmlNode node in nodes)
   {
      if(node.SelectSingleNode("id").InnerText == propertyid)
      {
           XmlNodeList addresses = node.SelectNodes("Address");
           foreach (XmlNode address in addresses)
           {
                streetBox.Text = address.SelectSingleNode("street").InnerText;
           }

           XmlNodeList prices = node.SelectNodes("Price");
           foreach(XmlNode price in prices)
           {
                priceBox.Text = price.SelectSingleNode("price").InnerText;
           }
       }
   }
}
Posted by: Guest on March-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language