473,654 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Select inside resource files

Hello,

I have 2 resource files.
The resource files have both inside the name field values.
I want to select from the first resource file the records where the name
field haves a value between 1 and 25.

Now I am doing this:
XmlDocument xdResx = new XmlDocument();
xdResx.Load("Re sources.resx");
XmlNodeList xnlValues = xdResx.SelectNo des("root/data/value");

But this loads everything. Is there not a better way? Can you give me an
example?

After selecting I want to update the second resource file.
How can I query the resource file. (Like with SQL, update where name field
is...)

Thanks!
Arjen

Nov 16 '05 #1
2 1761
You basically have the right idea. After selecting the nodes,
you need to examine each value and filter the ones you want;
that is 1< value< 25, so

foreach(Node node in XmlNodeList)
{ if(node.Value > 1 && node.Value <= 25)
{ // ... do something; }
}

To update the second resource file, I would
use xmldom, and selectNode, just like your
example.

--

This posting is provided "AS IS" with no warranties, and confers no rights.
"Arjen" <bo*****@hotmai l.com> wrote in message
news:c8******** **@news1.tilbu1 .nb.home.nl...
Hello,

I have 2 resource files.
The resource files have both inside the name field values.
I want to select from the first resource file the records where the name
field haves a value between 1 and 25.

Now I am doing this:
XmlDocument xdResx = new XmlDocument();
xdResx.Load("Re sources.resx");
XmlNodeList xnlValues = xdResx.SelectNo des("root/data/value");

But this loads everything. Is there not a better way? Can you give me an
example?

After selecting I want to update the second resource file.
How can I query the resource file. (Like with SQL, update where name field
is...)

Thanks!
Arjen


Nov 16 '05 #2
Hi,

What wrong with this?
xdResx.SelectNo des("root/data/[value>1]/value");

Thanks!

"S. Han" <@> schreef in bericht news:40******** @news.microsoft .com...
You basically have the right idea. After selecting the nodes,
you need to examine each value and filter the ones you want;
that is 1< value< 25, so

foreach(Node node in XmlNodeList)
{ if(node.Value > 1 && node.Value <= 25)
{ // ... do something; }
}

To update the second resource file, I would
use xmldom, and selectNode, just like your
example.

--

This posting is provided "AS IS" with no warranties, and confers no rights.

"Arjen" <bo*****@hotmai l.com> wrote in message
news:c8******** **@news1.tilbu1 .nb.home.nl...
Hello,

I have 2 resource files.
The resource files have both inside the name field values.
I want to select from the first resource file the records where the name
field haves a value between 1 and 25.

Now I am doing this:
XmlDocument xdResx = new XmlDocument();
xdResx.Load("Re sources.resx");
XmlNodeList xnlValues = xdResx.SelectNo des("root/data/value");

But this loads everything. Is there not a better way? Can you give me an
example?

After selecting I want to update the second resource file.
How can I query the resource file. (Like with SQL, update where name field is...)

Thanks!
Arjen



Nov 16 '05 #3

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

Similar topics

11
13133
by: Danny Pressley | last post by:
I have a VS.NET 2003 Visual C++ MFC Application Project in which I added a new resource file, I then added an icon to this new resource file and did a rebuild and got the following error: "fatal error CVT1100: duplicate resource. type:ICON, name:1, language:0x0409". But the resource ID is unique and only located in the new Resource1.h and MyResourceFile.rc files. Any ideas why this error is occuring? To generate the issue real quick, you...
1
4001
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ==> .txt files from .resources or .resx files. ==> .resources files from text or .resx files.
4
11278
by: Nick Barr | last post by:
Hi, I am trying to gather stats about how many times a resource in our web app is viewed, i.e. just a COUNT. There are potentially millions of resources within the system. I thought of two methods: 1. An extra column in the resource table which contains a count. a. Each time a resource is viewed an UPDATE statement is run.
1
4025
by: scpedicini | last post by:
Let's say that I've built an assembly called MyApi.dll with two different language resource files, one called DefaultResource.resx (which is my english resource file), and a german resource file called DefaultResource.de.resx. However, I would like both of these files to live inside MyApi.dll. Inside MyApi.dll, I have a ResourceManager that is loaded using: new System.Resources.ResourceManager("MyNamespace.DefaultResource",...
16
2374
by: Chris Shearer Cooper | last post by:
In our Visual Studio 2005 application, we have several of our application's H files that are #included into stdafx.h. What is odd, is that when we change those application H files, VS2005 doesn't trigger a rebuild of the entire app (or of anything, for that matter). Is this a setting somewhere? Thanks!
12
5261
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
1
6992
by: TisMe | last post by:
Hi All, I am trying to use resource files to globalize my website application. I had this working fine, working through the API for setting page titles programatically, with the resource files in /resources I then started to add declarative code to the web forms to controls such as buttons and labels, as follows: <asp:Label ID="lblHowFindOut" runat="server" Text="<%$ Resources:how_did_you_find_out_about_this_site %>" />
1
1735
by: Michael | last post by:
Hi. Could anyone help me out with this one. I have a aspx page from where users may send invites to other users. When the user clicks the "send invite"-button an email is generated. Now here's the case: I'm interested in sending the email in the language chosen by the user.
4
7769
by: hapnendad | last post by:
In the question statement below Field names are in and variables are in (). All fields referenced are in what I have named the ‘PAR’ Table. Using MS Access 2003, I am working on a project management database and have reached the point where I need to develop a way for managers to re-assign responsibility for all active projects to another of his/her resources. The Field names for the different managers associated with each project are: ...
0
8379
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8709
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.