Solved

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

Posted on 2007-11-21
1
427 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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