473,396 Members | 1,773 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.

SelectNodes does not contain all nodes

Hi, I have this XML:

<section name="11">
<department department_id="10">
<employee employment_id="24" contract="100"/>
<employee employment_id="5054" contract_id="254"/>
<employee employment_id="5253" contract_id="1054"/>
<employee employment_id="5253" contract_id="1055"/>
<employee employment_id="5253" contract_id="1056">
<employee employment_id="248" contract_id="1010"/>
</department>
</section>

If I use this code:

For Each node As XmlNode In mStaff.MatrikelXML.SelectNodes("//employee")
Console.WriteLine(node.Attributes.GetNamedItem("em ployment_id").Value)
Console.WriteLine(node.Attributes.GetNamedItem("co ntract_id").Value)
Nex

User submitted from AEWNET (http://www.aewnet.com/)
Nov 12 '05 #1
0 873

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

Similar topics

5
by: Alexander Gnauck | last post by:
Hello, i have problems with the Namespaces and the .Net XML Parser My XML looks like this: <query xmlns="jabber:iq:roster"> <item jid="srlee@localhost" name="srlee"...
4
by: Andrew Parsons | last post by:
Hey all, I have the following code to get a set of nodes containing a certain search criteria: theSearchTermsXML.selectNodes("/Table/Row/Cell") This works fine to a point - it finds all...
1
by: Guest | last post by:
I wasn't ready... I have this XML: <section name="11"> <department department_id="10"> <employee employment_id="24" contract="125"/> <employee employment_id="5054" contract_id="11184"/>...
2
by: Michael H | last post by:
Hello group, I have a some xml that looks like this below: <tuneRequests ct="3" xmlns:sql="urn:schemas-microsoft-com:xml-sql" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tr...
2
by: Joe | last post by:
Hello All: Does anyone know the differnce between the GetElementsByTagName method and the SelectNodes method? I know that they take different arguments. They also both return a NodeList. I'm...
16
by: PiotrKolodziej | last post by:
Hi I'am using SelectNodes method to find if node followed by string exists, and if so i going to select that node. Create doc i such a way: doc = new XmlDocument(); ...
1
by: RKS | last post by:
Has anyone experienced a problem with the Sarissa implementation of selectNodes? My code, using the Sarissa parser, successfully loads an xml document into the domNode variable. The selectNodes...
3
by: Woon Kiat | last post by:
I have this Xml file, bookstore.xml <Bookstore xmlns="http://www.book.com"> <Shelve index="1"> <Book name="Da Vinci Code" /> </Shelve> <Shelve index="2"> <Book name="The Holy Grail" />...
8
by: Vikram Vamshi | last post by:
If I execute XmlNode.SelectNodes("some xpath query") and then use foreach to iterate over it. Will it guaratee that the order of nodes I get will be same as the order of nodes in the original xml...
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
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: 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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.