473,832 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

suggested ways to manipulate XML files in .Net?

Hi everyone,

I'm going to manipulate some XML files in my next project-- crawl through
the tags, compare if file X has the same nodes as file Y, and if not, what
the differences are and who's missing what. I'll also be comparing values
between nodes in the two files, for when both documents do have the same
named nodes. What .Net classes should I be looking at to accomplish these
tasks? Thanks a bunch.
Jul 17 '06 #1
2 1183


Steve Hershoff wrote:

I'm going to manipulate some XML files in my next project-- crawl through
the tags, compare if file X has the same nodes as file Y, and if not, what
the differences are and who's missing what. I'll also be comparing values
between nodes in the two files, for when both documents do have the same
named nodes. What .Net classes should I be looking at to accomplish these
tasks?
Well there are lots of ways, Xml(Text)Reader is fast forward only pull
parsing that does not consume much resources even if you read through
big files.
XPathDocument reads the complete document into a tree structure
optimized for XPath navigation which is read only.
Then there is XmlDocument which also reads the complete document into a
tree structure but then allows manipulation of the tree and saving back.

If you want to compare XML files then the XML Diff and Patch tool
<http://msdn.microsoft. com/XML/XMLDownloads/default.aspx>
might be interesting for you.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jul 18 '06 #2
Thanks, Martin. I'll look into the XML Diff and Patch tools.

-Steve
>
Well there are lots of ways, Xml(Text)Reader is fast forward only pull
parsing that does not consume much resources even if you read through big
files.
XPathDocument reads the complete document into a tree structure optimized
for XPath navigation which is read only.
Then there is XmlDocument which also reads the complete document into a
tree structure but then allows manipulation of the tree and saving back.

If you want to compare XML files then the XML Diff and Patch tool
<http://msdn.microsoft. com/XML/XMLDownloads/default.aspx>
might be interesting for you.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Jul 18 '06 #3

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

Similar topics

3
4526
by: Anonymous | last post by:
I need to create an application that will do fairly simple text manipulation on 20,000 files in text format (html files). The files exist both on my Windows machine and on a FreeBSD server. I prefer to do the manipulation on my machine where it's easier to create backup copies, recover from programming errors and so on, then upload the files to the server. All I'm doing is extracting certain elements from each file and creating a different...
17
2451
by: Andrae Muys | last post by:
Found myself needing serialised access to a shared generator from multiple threads. Came up with the following def serialise(gen): lock = threading.Lock() while 1: lock.acquire() try: next = gen.next() finally:
3
2038
by: Isaac Rodriguez | last post by:
Does anyone know of a Python API to manipulate CAB files? Thanks, -- Isaac Rodriguez SWE Autodesk. ======================================== There are 10 types of people. Those who undertand binary, and those who don't
2
1696
by: Pavils Jurjans | last post by:
Hello, I have a fairly complex project with server-side written in C# (.NET), and client-side heavily relying on the presence on JavaScript-compatible scripting engine. One of the features thie project utilizes is "virtual POST", ie, client side submits the data to the server side, using Microsoft.XMLHTTP ActiveX Object (in MSIE), or XMLHttpRequest class in Mozilla, and when the server returns reply, processes it in client side to run...
2
1222
by: jrefactors | last post by:
I want to use javascript to manipulate XML files. The following code works in IE but it won't work in Mozilla. var xml = new ActiveXObject("Microsoft.XMLDOM"); Any way to make it work in cross browsers? please advise. thanks!!
6
1882
by: Tim | last post by:
I need to manipulate files (rtf and wav files) on the server side. Can you show me how to do that? Thank you,
2
1208
by: Olivier Matrot | last post by:
Hello, I'm looking for a tool that is able to manipulate aspx source files (specifically <asp:datagrid> ) out of Visual Studio. The goal is to give aspx file to a web designer in order for him to acomodate our corporate web site design. This tool must know the HMTL rendering of standard server controls.
0
1123
by: Rvo | last post by:
Hi all, I need to manipulate (that means measure peak levels, measure length of peaks, not play-pause-rewind-etc..) ASF files. Does anybody know of any components that can be used for this purpose (I want to pay for it if necesarry). Thanks. Romain
1
1649
by: Sam Learner | last post by:
Hello, you guys have been very helpfull in responding to questions from the newgroup community and thank everyone for your contributions. I have a Question, I am developping a software to do clean up almost similar to the Clean-up Wizard... Is there any .NET classes that allow me to manipulate the Recycled bin? for example, allow me to purge a specific file in the Recycled Bin or all files there... Get a total files currently in the...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10780
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10212
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9319
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7753
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5623
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4421
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

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.