473,396 Members | 1,864 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,396 software developers and data experts.

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("Resources.resx");
XmlNodeList xnlValues = xdResx.SelectNodes("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 1746
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*****@hotmail.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("Resources.resx");
XmlNodeList xnlValues = xdResx.SelectNodes("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.SelectNodes("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*****@hotmail.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("Resources.resx");
XmlNodeList xnlValues = xdResx.SelectNodes("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
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...
1
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 ...
4
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...
1
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...
16
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...
12
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
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...
1
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...
4
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...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.