Solved

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

Posted on 2007-11-21
1
425 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 500 total points
ID: 20326521
string path = BusinessImageElement.InnerText;
pictureBox.Image = Image.FromFile(path);
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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