Compare XML
Comparator for XML Elements
Copyright (c) 2020 Fabian Fröhlich compare-xml@f-froehlich.de https://projects.f-froehlich.de/compare-xml
Donate
This project needs donations. Please check out https://projects.f-froehlich.de/Donate for details.
Quick setup
- install python 3.7 (other versions may also work)
- install python3-pip
- install Nmap
pip3 install compare-xml
Usage
from compare_xml.Comparator import compare, compare_lists
from xml.etree.ElementTree import ElementTree
xml1 = ElementTree().parse(source=filepath1)
xml2 = ElementTree().parse(source=filepath2)
compare(xml1, xml2) # False
compare(xml2, xml1) # False
compare(xml1, xml1) # True
compare(xml2, xml2) # True
compare_lists([xml1], []) # False
compare_lists([xml1], [xml2]) # False
compare_lists([xml1], [xml1]) # True
compare_lists([xml1, xml2], [xml2, xml1]) # True
compare_lists([xml1, xml2], [xml2, xml2]) # False
Contributors
| Name | info | |
|---|---|---|
| Fabian Fröhlich | compare-xml@f-froehlich.de | Main contributor and code owner |
Changelog
1.0.0
- Compare XML Elements and lists of XML Element
1.1.0
- Add support for lxml
Metadata
Release files for compare-xml 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| compare_xml-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for compare_xml-1.1.0-py3-none-any.whl |
Release files / compare_xml-1.1.0-py3-none-any.whl
| Download URL | compare_xml-1.1.0-py3-none-any.whl |
|---|---|
| Size | 29.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a20be9b1d5007b760cdaf1475c775cacd1dbd39b7acc42a59b9156f3263d4c6
|
|
BLAKE2b-256 checksum How to use checksums |
1f4b1668eb79340c7ed4596762b4e151ffa1010d897e939416559ccf38148333
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
|
Security for compare-xml 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.