Image location held in xml file. Want to use this in picturebox
Hey,
I have an xml file that looks like so..
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<business>
<image>C:\Logo.png</image>
</business>
</configuration>
I use this code to get the string C:\Logo.png...
XmlDocument doc = new XmlDocument();
doc.Load(c:\myxml.xml);
XmlNodeList BusinessNodeList = doc.SelectNodes("/configuration/business/image");
foreach (XmlElement BusinessImageElement in BusinessNodeList)
{
BusinessImageLocation = BusinessImageElement.InnerText;
}
How can I use "BusinessImageLocation" as the image in a picturebox?
pictureBox.Image = Image.FromFile(path);