473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Embed xml file as ressource file in an exe.

Is it possible to embed an xml file from the solution in a program at compile
time. Alternatively I will paste it in the code on the form

doc.LoadXml( "<root>...a billion zillion lines..</root>");

But It would be great if I could do a trick where an solution/project file
in xml could be embedded and read. Maybe something on the following form:

XmlDocument doc = new XmlDocument()
doc.Load({your great answer})

Jul 17 '06 #1
1 4653
Add the XML to the project and then in the properties of the object set
the Build Action to "Embedded Resource". You can open it by using
assembly.GetManifestResourceStream("Namespace.path .to.file.file.xml").

The name of the file is the namespace of the file (folder structure) +
it's name.

Regards,
Tasos
Jesper wrote:
Is it possible to embed an xml file from the solution in a program at compile
time. Alternatively I will paste it in the code on the form

doc.LoadXml( "<root>...a billion zillion lines..</root>");

But It would be great if I could do a trick where an solution/project file
in xml could be embedded and read. Maybe something on the following form:

XmlDocument doc = new XmlDocument()
doc.Load({your great answer})
Jul 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
3
by: Tony Sutton | last post by:
I have this following code in my html file: <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#...
1
by: serge calderara | last post by:
Dear all, We are bulding an application whcih is multilanguage based with the help of ressources. All language ressources will belongs to the same assembly. Now the idea is that I I need to...
0
by: Jéjé | last post by:
Hi, I have a web site in ASP.NET which use a compiled ressource file for the french version. (dlls of web controls) My DLLs are in the GAC. My website use the NT authentication and/or the...
8
by: Henry | last post by:
Hi, in a Windows form VB.Net project I use localization for all texts. In App.Config I added: <appSettings> <add key="locale" value="de"/> </appSettings> In the project I have ressource...
0
by: Progman | last post by:
to read the ressources, I execute the following code from my screen files. Is there another shorter way of doing this? Similar to...
4
by: Bob Bedford | last post by:
Hi all, I'm trying to pass a fopen() ressource result as a parameter. $x=fopen($filename); header('location:myfile.php?ressource='.$x); but it doesn't seem to work. How to do so ?
6
by: qualitychecker | last post by:
Hello thanks for your help.. I try to reference a PHP module from within a HTML file, see below ---------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.