473,387 Members | 1,621 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.

Embedded XML File

Tim
Hi,

I have a XML file the I use as config file for a libary. Is there a way to
use reflection to access the file using XMLReader?

Thanks
Oct 19 '06 #1
3 1312
"Tim" <ti***@tim.comwrote in
news:#N**************@TK2MSFTNGP03.phx.gbl:
Hi,

I have a XML file the I use as config file for a libary. Is there a
way to use reflection to access the file using XMLReader?
Did you embed the file as a local resource?
Oct 19 '06 #2
Tim
Yes

"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Tim" <ti***@tim.comwrote in
news:#N**************@TK2MSFTNGP03.phx.gbl:
>Hi,

I have a XML file the I use as config file for a libary. Is there a
way to use reflection to access the file using XMLReader?

Did you embed the file as a local resource?

Oct 19 '06 #3
private Assembly thisAssembly;
public void MethodName(string name)
{
if (thisAssembly == null)
{
thisAssembly = GetType().Assembly;
}
// Here is the resource stream
Stream s = thisAssembly.GetManifestResourceStream(name);
}

Regards,

Bela Istok
"Tim" <ti***@tim.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Yes

"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
>"Tim" <ti***@tim.comwrote in
news:#N**************@TK2MSFTNGP03.phx.gbl:
>>Hi,

I have a XML file the I use as config file for a libary. Is there a
way to use reflection to access the file using XMLReader?

Did you embed the file as a local resource?

Oct 19 '06 #4

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

Similar topics

4
by: Jay Douglas | last post by:
Hello all, I have a basic XML file of which I set the Build Action to "Embedded Resource" The XML file is simple: <root> <item> <name>Test Name</name> <description>Test...
1
by: Michael Palmer | last post by:
I'm reading xml from SQL Server 2K with VB.net using an XSD schema file and SQLXML 3.0. I have the below code working fine, but I'd like to change the code from reading the schema file from a...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
35
by: David Mathog | last post by:
Every so often one of my fgets() based programs encounters an input file containing embedded nulls. fgets is happy to read these but the embedded nulls subsequently cause problems elsewhere in...
1
by: james | last post by:
What class / method should I be using to get the full path to an embedded resource ? In my case I have an .xml file that my app uses, it is set as embedded resource, and I have a control that...
4
by: Patrick Blackman | last post by:
I have a text file embedded in my dll, how can I load that file without using the GetManifestResourceStream of the Assembly class, I want to read it as if it was just located in my c:\my document...
3
by: Ron Vecchi | last post by:
I have a text file(.js) that holds a buch of java script code that is rendered in some web controls all part of a larger webcontrol library. The file is rather large. Would embedding this...
4
by: Jason Pettys | last post by:
In an ASP.NET project I am setting the content type of my .ascx and ..aspx files to Embedded Resource for a separate reason. When I do this they get embedded as "RootNamespace.Filename" but I...
4
by: Chris8Boyd | last post by:
I am embedding Python in a MSVC++ (2005) application. The application creates some environment and then launches a Python script that will call some functions exported from the MSVC++ application....
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.