Skip to main content

XML Patcher

Latest release on pypi.org

A convenient library for patching XML files with XPath.

Usage example:

from xmlpatcher import XMLDocument
from xmlpatcher.patches import SetValue, Remove

document = XMLDocument("./example.xml")
document.patch(
    SetValue("/Book/@color", "red"),
    Remove("/Book/Page[1]")
)
document.save()

The above code will transform this file:

<Book color="blue">
    <Page>Welcome</Page>
    <Page>Goodbye</Page>
</Book>

Into this:

<Book color="red">
    <Page>Goodbye</Page>
</Book>

Metadata

Release files for xmlpatcher 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xmlpatcher 1.0.4
File Size Uploaded Provenance Actions
xmlpatcher-1.0.4.tar.gz 3.8 kB Without provenance Details for xmlpatcher-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xmlpatcher 1.0.4
File Interpreter ABI Platform Actions
xmlpatcher-1.0.4-py3-none-any.whl Python 3 none any Details for xmlpatcher-1.0.4-py3-none-any.whl

Total release size: 10.2 kB

Release files / xmlpatcher-1.0.4.tar.gz

Download URL xmlpatcher-1.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e83a776237813cc9da389b8b89b03f6a2fd562876d49dd489789ae8977d3bd58
BLAKE2b-256 checksum
How to use checksums
f73e737029516463a948266bab8b90fc78374f83035c89be23418046af583dc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.13

Release files / xmlpatcher-1.0.4-py3-none-any.whl

Download URL xmlpatcher-1.0.4-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa49fa9311415d243df88f9183d185fd0289eab3d86b5a88292b57f42b5b55ed
BLAKE2b-256 checksum
How to use checksums
34fa717321b8cccef1d19f1a7c85a0b400029ca0758698d6fd856b0a15bb543e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.13

Security for xmlpatcher 1.0.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page