Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Image location held in xml file. Want to use this in picturebox

Posted on 2007-11-21
1
Medium Priority
?
450 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:Antonio King
1 Comment
 
LVL 7

Accepted Solution

by:
bungHoc earned 2000 total points
ID: 20326521
string path = BusinessImageElement.InnerText;
pictureBox.Image = Image.FromFile(path);
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question