Skip to main content

UNKNOWN

Project description

This module allows for order agnostic comparison‎ of XML data. It will parse files to determine if they are a match while ignoring the order of attributes or duplicate nodes.

Dependencies: ElementTree

Sample usage:

open two files, parse with ElementTree, and pass to xml_diff function

oFile1 = open(r’C:test1.xml’, ‘r’) oFile2 = open(r’C:test2.xml’, ‘r’) oXml1 = ET.parse(oFile1) oXml2 = ET.parse(oFile2) print xml_diff(oXml1, oXml2)

pass in xml as strings

sOrder1 = ‘<ItalianFood><Pizza Sauce=”Red” Cheese=”Mozzarella” Crust=”Thin”><Quantity>2</Quantity></Pizza><Pizza Sauce=”OliveOil” Cheese=”Feta” Crust=”Thin”><Quantity>1</Quantity></Pizza></ItalianFood>’ sOrder2 = ‘<ItalianFood><Pizza Sauce=”OliveOil” Cheese=”Feta” Crust=”Thin”><Quantity>1</Quantity></Pizza><Pizza Sauce=”Red” Cheese=”Mozzarella” Crust=”Thin”><Quantity>2</Quantity></Pizza></ItalianFood>’ print xml_diff(sOrder1, sOrder2)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PizzaPyDiff-0.2dev.zip (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PizzaPyDiff-0.2dev.win32.exe (199.0 kB view details)

Uploaded Source

File details

Details for the file PizzaPyDiff-0.2dev.zip.

File metadata

  • Download URL: PizzaPyDiff-0.2dev.zip
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PizzaPyDiff-0.2dev.zip
Algorithm Hash digest
SHA256 6d6702c80f4f67914037d04cf5387a70a4e85d8f23aa4c5e80dcdab6fab21c62
MD5 e7fb5a61a06e900e47e7410f91d27d3b
BLAKE2b-256 5927f8c7b1c71a4150ff3f5eeed25e0ba8b3a5e6abde3d5654d89c3e2b1c28d2

See more details on using hashes here.

File details

Details for the file PizzaPyDiff-0.2dev.win32.exe.

File metadata

File hashes

Hashes for PizzaPyDiff-0.2dev.win32.exe
Algorithm Hash digest
SHA256 43988d75a7ba59d8b179e0ad5b640ee93c1d8f41d82259a32803392db7f50e7c
MD5 f581086644c2cb189ebf97956879bf74
BLAKE2b-256 46bf58331b614f525c2a79f9880f0de4b5d130c1f2e018aa5dc5e74d068f8b4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page