473,405 Members | 2,445 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,405 software developers and data experts.

generalzing the xpathexpression using variables <<urgent>>

hi to all,

i am new to this forum and also new to xml too...

i have an xpath expression to select a list of values...

XmlNodeList nl=doc.SelectNodes("//group[@group_name='Friends']/@group_name")

it can select only the node having value as Friends

i want to generalize the expression by substituting a variable in place of 'Friends'

how can i do .....
pls guide me
Feb 21 '08 #1
1 933
vee10
141 100+
Hi ,

this how u can use variables in xpath expressions
string varGroup="Friends"
xmlDoc.SelectSingleNode("//group[@group_name = '" + varGroup + "']").InnerText


hi to all,

i am new to this forum and also new to xml too...

i have an xpath expression to select a list of values...

XmlNodeList nl=doc.SelectNodes("//group[@group_name='Friends']/@group_name")

it can select only the node having value as Friends

i want to generalize the expression by substituting a variable in place of 'Friends'

how can i do .....
pls guide me
Feb 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Timothy Casey | last post by:
Thanks in advance... =~= Timothy Casey South Australia worloq@iprimus.com.au Formerly: casey@smart.net.au
2
by: mortb | last post by:
I create a table containing radiobuttons in client script depending on what choices the user makes. It works fine the radio buttons appear *but* they are *not clickable*. Why? Is there a solution?...
0
by: Daniel | last post by:
HI, Does anyone know to create crystal reports with sql string (T-SQL) query..?? If have any example more prefer. thanks in advance.... daniel.
0
by: Fabrice DG. | last post by:
Hi, we've got a small security setting problem here, an as I'm new to server 2003, I can solve it alone... here is the situation : we have a web application, hosted on Windows Server 2003,...
0
by: Dheeraj Verma via DotNetMonster.com | last post by:
Hi all, I have a asp data grid under which i have another datagrid which is my user control and is autogenerated.Now I am not able to implement sorting in my inner datagrid eventhough I have...
1
by: John | last post by:
Hi all, I did post this about 10 hours ago thinking I would have received an answer now but it is quite urgent. How do I add a COM object to a web form? I notice there's a primary interop...
9
by: Fazal | last post by:
Hi, I'am developing a project for training management in a company where the department trains the internal employees. I have been given the job to display the reports. Where I got stuck with...
12
by: menmysql | last post by:
hi i want to dispaly an image on my webpage which is selected using <input type="file">. is it possible. please reply urgent ...
2
by: Shahid | last post by:
Hi, I am parsing an .HTML file that contains following example code: <div> <p class="html_preformatted" awml:style="HTML Preformatted" dir="ltr" style="text-align:left"><span...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.