A tool for healing and diffing broken XML.
Project description
xml-healer
A Python tool for healing and diffing broken XML. Automatically fixes common XML errors and provides a diff of changes.
Features
- Repairs broken or malformed XML
- Detects and reports tag mismatches, missing/extra tags, and text changes
- Provides a diff of all structural and tag changes
- Easy to use API and CLI
Usage (Python)
from healer.xml import heal_xml
xml = "<a><Name>John</NAme>"
result = heal_xml(xml)
print(result.fixed_xml)
print(result.diff)
Usage (Command Line)
You can use the CLI after installing:
xml-healer '<a><Name>John</NAme>'
Or to heal an XML file:
xml-healer path/to/file.xml --file
Installation
pip install xml-healer
Testing
Run all tests with:
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xml_healer-0.1.0.tar.gz
(10.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xml_healer-0.1.0.tar.gz.
File metadata
- Download URL: xml_healer-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fc7bb84a28e3640f48e9ebaf2229a63561a43acf8328a34fec2e44e71a1a3f
|
|
| MD5 |
444b407b2f58a48bc8b7d8a922ec01e7
|
|
| BLAKE2b-256 |
b65ed531ee2b00b697c9ab89699b05ac15e2b216280809b946c158465761ba78
|
File details
Details for the file xml_healer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xml_healer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680f5423841ec8462bac5deb82071137d7093a788a3781eaa2c62c322339b0cd
|
|
| MD5 |
e204668a8e300b9304ad1d4f6a254292
|
|
| BLAKE2b-256 |
9c4c1a988acd9023e1fc1dcc81656c17e1c7835ec067adac901143d3ae0c0c81
|