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

xml question with c#

i have xml like below
<ROOT>
<ITEM Name="Hello">
<SomeValue1a </SomeValue1>
<SomeValue2b </SomeValue2>
</ITEM>
<ITEM Name="World">
<SomeValue1BOB </SomeValue1>
<SomeValue2CAROL </SomeValue2>
</ITEM>
</ROOT>
How to Selectsinglenode() to get to the Node ITEM with Name = "World"
or do i have to Loop and Find it that way

Thanks
DaveL

Aug 24 '08 #1
2 966
daveL wrote:
i have xml like below
<ROOT>
<ITEM Name="Hello">
<SomeValue1a </SomeValue1>
<SomeValue2b </SomeValue2>
</ITEM>
<ITEM Name="World">
<SomeValue1BOB </SomeValue1>
<SomeValue2CAROL </SomeValue2>
</ITEM>
</ROOT>
How to Selectsinglenode() to get to the Node ITEM with Name = "World"
or do i have to Loop and Find it that way
Try:

doc.SelectSingleNode("//ROOT/ITEM[@Name='World']")

Arne
Aug 24 '08 #2
Thanks alot
DaveL

"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:48***********************@news.sunsite.dk...
daveL wrote:
>i have xml like below
<ROOT>
<ITEM Name="Hello">
<SomeValue1a </SomeValue1>
<SomeValue2b </SomeValue2>
</ITEM>
<ITEM Name="World">
<SomeValue1BOB </SomeValue1>
<SomeValue2CAROL </SomeValue2>
</ITEM>
</ROOT>
How to Selectsinglenode() to get to the Node ITEM with Name = "World"
or do i have to Loop and Find it that way

Try:

doc.SelectSingleNode("//ROOT/ITEM[@Name='World']")

Arne

Aug 24 '08 #3

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

Similar topics

0
by: Madhusudan Singh | last post by:
Hi After months of waiting for Redhat to come out with up to date rpms, I decided to compile a working OpenSSL/ MySQL / PHP / httpd installation for myself. Installed the latest versions of...
0
by: Alexander Skwar | last post by:
Hello! I'm having problems getting PHP 4.3.3RC4 successfully to install on my HP-UX 11.00 server. After a (successfull?) compile, "make install" errors out with this error message: ...
7
by: Darren Gamble | last post by:
Good day, I've sent a message on this to the php-general list already, but unfortunately no one replied. Sorry for the repost. to those that read both... I'm having a problem working with an...
0
by: Slavik | last post by:
All libraries were installed (precompiled) This is FreeBSD 5.1 installed zlib, installed jpeg and png libraries (in default directories) GD 2.0.11 source is in /usr/gd-2.0.11 (compiled and...
0
by: LRW | last post by:
(Not even sure if that's the right way to word the question.) We're trying to migrate to a new server, and upgrade the PHP on the new server in the process. We're using a RedHat Enterprise Server...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.