473,320 Members | 1,744 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.

XPathDocument faster than XMLDocument ?

working with a local xml file. perform an xpath query and iterate through
the resultset to build a virtual DataTable -- each DataRow composed of
multiple attributes of each element in the xpath resultset ...

is working with an XPathDocument faster than working with an XMLDocument ?
if so , how much faster ?
Nov 12 '05 #1
1 2236
John A Grandy wrote:
is working with an XPathDocument faster than working with an XMLDocument ?
if so , how much faster ?


Sure. XPathDocument is in average 30-40% faster and takes less memory.
Always use it unless you need to edit XML in memory (I'm talking about
..NET 1.X, because in .NET 2.0 XPathDocument is editable too).

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

1
by: Ian Lawton | last post by:
Hi, in a C# app, I have an XPathDocument that looks similar to this: <row uniqueid="4234" /> <row uniqueid="4365" /> <row uniqueid="3124" /> <row uniqueid="9879" /> <row uniqueid="1332" />...
2
by: Robert Strickland | last post by:
I load an xml stream into a xpathdocument type, compile a xpath expression and select to specific node. I find the node and wish to return the innerxml of that node. When I use value of the current...
2
by: Jim Lewis | last post by:
After everything I have read and some of my own testing I am convinced that XPathDocument are more efficient if you are only using XML for read only and not modifying the XML. However, I have been...
2
by: Ed S | last post by:
Hi All, I'd like to convert from an XmlDocument to an XPathDocument (without saving the XmlDocument down to a file - this is a web app). I can't see any way to do this. Any help is...
5
by: Fahad Ashfaque | last post by:
Hi, I've an object of XmlDocument, I need to pass it to some function which takes XpathDocument object, How could I convert? There is not Conversion Operator overload like that. Your reply...
2
by: steve bull | last post by:
I have an XPathDocument which contains a list of color definitions. If I want to add a new color definition to, or delete an existing one from, the source xml file how can I force this to be...
5
by: Ben R. | last post by:
Hi, Could someone explain the functional difference between these classes? From what I understand, xpathdocument is faster in some scenarios, but I'm not sure why. Further, why is it that the...
2
by: Tony Girgenti | last post by:
Hello. I'm developing a web comsuming client using VS.NET 2003(VB), .NET Framework 1.1.4322, ASP.NET 1.1.4322, WSE2.0 on a WinXP Pro Sp2 computer. I'm getting an XML document this way: Dim...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I've been trying to improve the performance of our xml handling, so I've been doing some timing tests lately and ran across something I thought odd - XPathDocument seems slightly slower...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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

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.