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

Obtaining Count of Node Foo

I want to be able to query an xml file to obtain a node count of foo.
I know the Xpath expression should be count(Foo) but I dont know if I should
use XPathDocument or not.
Nov 11 '05 #1
1 1323
Mike McCarthy wrote:
I want to be able to query an xml file to obtain a node count of foo.
I know the Xpath expression should be count(Foo) but I dont know if I should
use XPathDocument or not.


According to my rough test, XPathDocument is 30% faster than XmlDocument on
evaluating count(foo) expression.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2

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

Similar topics

0
by: Steve Roberts | last post by:
I want to write a graphical view of an XML tree, using a DOM interface, that allows the XML tree to be edited, with nodes being added or removed. For this I was going to create a basic tree...
2
by: Nutshell | last post by:
Hi, I would like to add an attribute to the child node if it is the only child node. The problem is I am not getting the correct count of child nodes with this template: <?xml version="1.0"?>...
3
by: rob.guitar.rob | last post by:
Hello, My last few posts have been revolving aroung the same problem, and I still cant solve it and I would be really appreciate if anyone could spot a problem. a section of my XML goes like...
2
by: chris yoker via DotNetMonster.com | last post by:
hiya, I can obtain innnerText of a node as follows: <code> itemCode = currNode.ChildNodes(4).InnerText() <\code> great, but if change the XML node order, then I have to re-code. I tried...
4
by: ralf321 | last post by:
Hello! i want to count elements in xslt. All with meta=13 contains a AND meta 14 contains b but it dont work any Idee why? Thanks. i try it with count(object/node/data)
3
by: awebguynow | last post by:
with an xpath expr: step1/step2 I'm trying to get the position() of step2, using the qualifying predicate. I've seen some suggestions, of ways to do this, using count() instead, but I'm not...
11
by: seannakasone | last post by:
Is there a way to get the callstack level in c++? for example, take the following code: void call3() { //callstack level would be 3 } void call2() { //callstack level would be 2 call3();
2
by: Daz | last post by:
Hi. I would like to know how to obtain a reference to (or at least, element type of) the last node which was inserted into the document. I am using an event listener to listen for dom inserts,...
7
by: Ebenezer | last post by:
Hello! Let's suppose we have an XML with some nested NODE nodes: <root attr="first"> <node id="1" attr="mike"> <node id="2" /> <node id="3" attr="dave" /> </node> <node id="4">
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: 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
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
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
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...
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.