Pretty-print XML and HTML files in a light, YAML-like, readable format
Project description
Unxml
Simplify and "flatten" XML files into a YAML-like readable format.
This is a Rust clone of the original unxml F# tool.
Installation
Pre-built Binaries (Recommended)
Download the latest release for your platform from the GitHub Releases page:
- Linux (x86_64):
unxml-linux-x86_64.tar.gz - Windows (x86_64):
unxml-windows-x86_64.zip - macOS (Intel):
unxml-macos-x86_64.tar.gz - macOS (Apple Silicon):
unxml-macos-arm64.tar.gz
Extract the archive and place the unxml binary in your PATH.
From Source
git clone https://github.com/yourusername/unxml-rs
cd unxml-rs
cargo install --path .
Using Cargo
cargo install unxml
Usage
unxml <xml_file>
Introduction
This command line application was developed for comparing XML files (e.g. database/application state dumps). It takes an XML file and converts it to a YAML-like syntax that is easier to read and compare.
Example
Given this XML input:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PackAsTool>true</PackAsTool>
<Description>Unxml 'pretty-prints' xml files in light, yamly, readable format</Description>
<PackageVersion>1.0.0</PackageVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="FileSystemHelper.fs"/>
<Compile Include="MutableCol.fs"/>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>
The output would be:
Project
[Sdk]: Microsoft.NET.Sdk
PropertyGroup
OutputType = Exe
TargetFramework = netcoreapp2.1
PackAsTool = true
Description = Unxml 'pretty-prints' xml files in light, yamly, readable format
PackageVersion = 1.0.0
ItemGroup
Compile
[Include]: FileSystemHelper.fs
Compile
[Include]: MutableCol.fs
Compile
[Include]: Program.fs
Key Features
- Attributes in Square Brackets: Element attributes are displayed as
[attribute]: value - Text Content with Equals: Element text content is shown as
ElementName = text content - Hierarchical Indentation: Nested elements are properly indented
- Clean Format: Easy to read and compare, great for diffing
Technical Details
- Built with Rust for performance and safety
- Uses
quick-xmlfor fast XML parsing - Uses
clapfor command-line argument parsing - Proper error handling with
anyhow
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Creating Releases
To create a new release:
- Update the version in
Cargo.tomlandsrc/main.rs - Commit the version changes
- Create and push a version tag:
git tag v1.0.1 git push origin v1.0.1
- The GitHub Actions workflow will automatically build binaries for all platforms and create a release
The CI workflow runs on every push to ensure code quality with formatting checks, linting, and tests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 unxml_rs-1.0.0-py3-none-win_amd64.whl.
File metadata
- Download URL: unxml_rs-1.0.0-py3-none-win_amd64.whl
- Upload date:
- Size: 730.7 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
031d6275392826e76178b54fd4249fd6c2482c0418e77383e442ffeeb42286d6
|
|
| MD5 |
dc2b1ba92ed97c3890f7fc2f514c8a0e
|
|
| BLAKE2b-256 |
d6202620e79be2b00bbeeb02f02994a941a3082132cf9cacbbf472f9d4b78db1
|
Provenance
The following attestation bundles were made for unxml_rs-1.0.0-py3-none-win_amd64.whl:
Publisher:
release.yml on vivainio/unxml-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxml_rs-1.0.0-py3-none-win_amd64.whl -
Subject digest:
031d6275392826e76178b54fd4249fd6c2482c0418e77383e442ffeeb42286d6 - Sigstore transparency entry: 1853491850
- Sigstore integration time:
-
Permalink:
vivainio/unxml-rs@f64911913c24a7df464c47a3daa7db24bd47a598 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vivainio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f64911913c24a7df464c47a3daa7db24bd47a598 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unxml_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: unxml_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 935.2 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fda129bc2c565e6c4c5039ec94c14acc8195c6cae569985f2d880843fed89276
|
|
| MD5 |
204495624814014aec8021b4e6120f26
|
|
| BLAKE2b-256 |
e74e808f9c090ea69c87ea13ea4aa632906c57d52cd0069833afb55604374c4d
|
Provenance
The following attestation bundles were made for unxml_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on vivainio/unxml-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxml_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
fda129bc2c565e6c4c5039ec94c14acc8195c6cae569985f2d880843fed89276 - Sigstore transparency entry: 1853491821
- Sigstore integration time:
-
Permalink:
vivainio/unxml-rs@f64911913c24a7df464c47a3daa7db24bd47a598 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vivainio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f64911913c24a7df464c47a3daa7db24bd47a598 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unxml_rs-1.0.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: unxml_rs-1.0.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 846.4 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89b40b3b9d897a862cb048d8796cbdd57a49f05de0de7b87673f9dbedd6c78a5
|
|
| MD5 |
a0521353430dd7e574143b58387e83f8
|
|
| BLAKE2b-256 |
babc0843c0f934369ee8b92b4acaba8cce4f156827e8c9a7fc07d810c89c5b2a
|
Provenance
The following attestation bundles were made for unxml_rs-1.0.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on vivainio/unxml-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxml_rs-1.0.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
89b40b3b9d897a862cb048d8796cbdd57a49f05de0de7b87673f9dbedd6c78a5 - Sigstore transparency entry: 1853491866
- Sigstore integration time:
-
Permalink:
vivainio/unxml-rs@f64911913c24a7df464c47a3daa7db24bd47a598 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vivainio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f64911913c24a7df464c47a3daa7db24bd47a598 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unxml_rs-1.0.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: unxml_rs-1.0.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 863.0 kB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b271d5baa134c4c2b747c049640dcd86b505a0eef62908be78b6c5d02a3d0e5
|
|
| MD5 |
78e8fa4d6db6173b3bb2e57a72993682
|
|
| BLAKE2b-256 |
aaefd204ab9c15ea44c3268962f40fb9c0d08c26d80018caf53ed4e424c4561c
|
Provenance
The following attestation bundles were made for unxml_rs-1.0.0-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on vivainio/unxml-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxml_rs-1.0.0-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
4b271d5baa134c4c2b747c049640dcd86b505a0eef62908be78b6c5d02a3d0e5 - Sigstore transparency entry: 1853491892
- Sigstore integration time:
-
Permalink:
vivainio/unxml-rs@f64911913c24a7df464c47a3daa7db24bd47a598 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vivainio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f64911913c24a7df464c47a3daa7db24bd47a598 -
Trigger Event:
push
-
Statement type: