473,287 Members | 1,650 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,287 software developers and data experts.

Comparing 2 xml's

Is there a way to compare 2 xml's in python? I am aware of the sax and dom parsers, but I think those are for parsing single files.

Thanks for the help,
Manny
Oct 16 '07 #1
2 2103
bartonc
6,596 Expert 4TB
Is there a way to compare 2 xml's in python? I am aware of the sax and dom parsers, but I think those are for parsing single files.

Thanks for the help,
Manny
Perhaps the difflib is what you are looking for.
Oct 16 '07 #2
I need to step through each element to do a comparison of the attributes on each file. So I don't think the difflib would help, but thanks though.

Manny
Oct 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Skip Montanaro | last post by:
I'd like to compare two xml.dom.minidom objects, but the naive attempt fails: >>> import xml.dom.minidom >>> d1 = xml.dom.minidom.parse("ES.xml") >>> d2 = xml.dom.minidom.parse("ES.xml") >>> d1...
1
by: Doug | last post by:
I need to compare two "address" structures within a document, and perform some action if they are not equal. The XML document is a purchase order, with an address at both the header and line...
8
by: Corno | last post by:
Hi all, Does anybody know a command line tool (linux or windows) that can compare 2 XML files. There's only 1 extra requirement that makes it a bit more complicated: the order of attributes or...
5
by: Donal McWeeney | last post by:
Hi, Does anyone know any good tools for performing a side by side comparison of 2 xml documents on an element by element and attribute by attribute basis. Thanks Donal
4
by: ddd | last post by:
I am trying to build a diff tool that allows me to compare two HTML files. I am looking for resources on how to achive this. The main problem is that I do not want to simply highlight the line of...
2
by: Ryan Adler | last post by:
I have a terrible headache from this problem. Perhaps someone can help. My XML is formatted like this: <events> <event> <starts-at>123456<starts-at/> <event> ... <events/>
0
by: Chris | last post by:
Hallo everybody, I have the following problem. There are two XML files: first one (FIRST.xml) includes all products definition, the second one (SECOND.xml) is a product instance. What do I need...
3
by: zeyais | last post by:
I am working on a migration project. There are two XML documents one in the old system and one in the new system. They both are identical but dynamically created from the datasource that is being...
1
by: Kevin Blount | last post by:
I'm getting data from an XML file using this method: $name = $xml->user_info->user; $nickname = $xml->user_info->user; & $age = $xml->user_info->user; $shoe_size = $xml->user_info->user;
0
by: Nick | last post by:
Hi, I need to compare two xml files. Which contain multiple xml datas based on a key. So for eg. I have two xmls A.xml and B.xml. A.xml : <?xml version="1.0" encoding="UTF-8"?> <Test >
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
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)...

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.