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

Reading XML subtree

I am trying to figure out the best approach on reading a
portion of an XML file.

I have the following:

<Employees>

<Employee>
<Name>John Doe</Name>
<Address>...
</Employee>

<Employee>
<Name>Jane Doe</Name>
<Address>...
</Employee>

I only need to read all the child elements below the
<Address> for John Doe.

How can I do this?

- j. oliver

Nov 15 '05 #1
1 2089
Just load it into an XmlDocument and use an XPath.

It's been a while, but something like "/Employees/Employee[Name = 'John
Doe']/Address/*".

"Jose Oliver" <jo*********@hotmail.com> wrote in message
news:02****************************@phx.gbl...
I am trying to figure out the best approach on reading a
portion of an XML file.

I have the following:

<Employees>

<Employee>
<Name>John Doe</Name>
<Address>...
</Employee>

<Employee>
<Name>Jane Doe</Name>
<Address>...
</Employee>

I only need to read all the child elements below the
<Address> for John Doe.

How can I do this?

- j. oliver

Nov 15 '05 #2

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

Similar topics

0
by: .pd. | last post by:
Hello - is it possible to create a treeview and have a second treeview point to a subtree of the first treeview? E.g. treeview1 = level0 level1a level2a level3a
2
by: ahogue at theory dot lcs dot mit dot edu | last post by:
Hello - Is there any way to match complex subtree patterns with XPath? The functions I see all seem to match along a single path from root to leaf. I would like to match full subtrees. For...
1
by: Martin Bright | last post by:
I am trying to write an XSLT template which creates a subtree of an input document, which is a simple tree. For example, the input might be <node name="1"/> <node name="2"> <node name="2.1"/>...
1
by: Anthony Mak | last post by:
Hi all, I am using Xerces DOM library. I want to get a subtree (everything including the tags ) from an xml document as a string ( and save this subtree into a xml/text file). Currently I am...
1
by: Vinci | last post by:
Hi, I'm using Python to work on Xml documents importing the minidom module: in particular I need to get the whole subtree rooted at a given node "n". Does anyone know whether there is a way to...
1
by: Dan Pavel | last post by:
Hi, I have a function, mib_read_getnext, where I get a MIB subtree. It works well but randomly hangs. I am using snmp.dll from http://www.c-sharpcorner.com/Code/2002/Sept/SnmpLib.asp How I...
1
by: Zean Smith | last post by:
Anyone knows how to read the Active Directory information from ASP.NET? I want to get all the people in my company as the phone directory for Intranet. Thanks..
4
by: Pere Raphael | last post by:
Hi all, I am writng some code to read AD user properties but I am not having much luck reading octet values. For example, there is a property userPassword which returns System.Byte. When I...
4
by: John | last post by:
Hi Outlook 2003 connected with exchange server. A user is logged in to the client pc. Is it possible to programmatically get the user's email address that is set on the 'Email Addresses' tab...
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...
1
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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.