Solved

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

Posted on 2007-11-21
1
410 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:Alan-Yeo
1 Comment
 
LVL 7

Accepted Solution

by:
bungHoc earned 500 total points
Comment Utility
string path = BusinessImageElement.InnerText;
pictureBox.Image = Image.FromFile(path);
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now