473,564 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Faster XML Processing...

Need some help on how to make the following faster....

Public XmlDocument ProcessXML( XmlDocument xmlData )
{
XmlNode originalXML = xmlData.Clone() ;

try
{
// Process XML data here...
}
catch
{
// if ANYTHING goes wrong with XML processing
// revert back to the original.
xmlData.LoadXml (originalXML.Ou terXml);
return xmlData;
}

return xmlData;
}

There it is. Without cloning and reloading in the catch block, if something
goes wrong, I get SOME xml processing, which I absolutely cannot have. For
example, if some data in the XML is invalid, I throw an exception, but I
still get back all the XML processed before that error ocurred. I need to
either have the entire XML document processed error free, or revert back to
the original (as is being done in the code) if there is any error anywhere.
Can anyone think of a better approach? A faster approach?

Thank you.
Nov 12 '05 #1
0 1087

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

Similar topics

6
1236
by: Kamilche | last post by:
I have a routine that I really need, but it slows down processing significantly. Can you spot any ineffeciencies in the code? This code makes a critical function of mine run about 7x slower than using a prebuilt format string. For maximum flexibility, it would be best to calculate the format string using this method, so I'd dearly love to...
8
1579
by: changereality | last post by:
I am trying to process raw IIS log files and insert them into a MySQL database. I have no problem accomplishing this, but the php code runs very slow. Right now, it is processing 10,000 lines in a log file every ~300 seconds. I am dealing with daily log files with records over 500,000. It takes hours to process a daily file. <?php...
1
2012
by: Kamyk | last post by:
Hello all! I have such question to all of you. I have some tables linked from MS SQL Server 2000. Is time of processing query based on these linked tables from MS SQL Server 2000, faster or slower than the time of processing the same query based on tables, which are not linked but imported to MS Access?
5
1743
by: DMan | last post by:
Need some help on how to make the following faster.... Public XmlDocument ProcessXML( XmlDocument xmlData ) { XmlNode originalXML = xmlData.Clone(); try { // Process XML data here... }
4
1950
by: sunilkher | last post by:
Here is a small sample program that I have. #include <stdlib.h> #include <pthread.h> #include <string> using namespace std; pthread_t threads; pthread_attr_t thr_attr;
10
2165
by: Extremest | last post by:
I know there are ways to make this a lot faster. Any newsreader does this in seconds. I don't know how they do it and I am very new to c#. If anyone knows a faster way please let me know. All I am doing is quering the db for all the headers for a certain group and then going through them to find all the parts of each post. I only want...
16
1597
by: bartj1 | last post by:
Hi, I did a benchmark comparison of a National Instruments Active-x "Strip Chart" control in both Vb5 and vb.net(2005). The code is identical: For I = 1 to 10000 ARR(1,0) = J AxCWGraph1.ChartY(arr) j = J + 1 If j 10 then j = 0
23
2506
by: Python Maniac | last post by:
I am new to Python however I would like some feedback from those who know more about Python than I do at this time. def scrambleLine(line): s = '' for c in line: s += chr(ord(c) | 0x80) return s def descrambleLine(line):
28
2424
by: n00m | last post by:
Both codes below read the same huge(~35MB) text file. In the file 1000000 lines, the length of each line < 99 chars. Stable result: Python runs ~0.65s C : ~0.70s Any thoughts?
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.