xmltree
Full file(content) tree → XML
Installation
# Install globally with uv (recommended)
uv tool install xmltree
# Or use directly without installing
uvx xmltree
# Or install with pipx
pipx install xmltree
Usage
# Convert current directory
xmltree
# Convert specific directory
xmltree /path/to/project
# Save to file
xmltree -o project.xml
# Only include specific file types
xmltree -I "*.py" -I "*.md"
# Exclude additional patterns
xmltree -i "*.log" -i "temp/*"
# Show absolute paths
xmltree --full-paths
# Compact output
xmltree --compact
Example
Given a project structure:
example_project/
├── src/
│ ├── __init__.py
│ ├── main.py
│ └── utils/
│ └── helpers.py
├── tests/
│ └── test_main.py
├── .gitignore
├── README.md
└── pyproject.toml
Running xmltree example_project produces:
<?xml version="1.0" encoding="UTF-8"?>
<directory path="example_project">
<directory path="src">
<file path="src/__init__.py">
<content><![CDATA[
"""Example package."""
__version__ = "0.1.0"]]></content>
</file>
<!-- ... more files ... -->
</directory>
<file path="README.md">
<content><![CDATA[
# Example Project
This is a sample project to demonstrate xmltree.]]></content>
</file>
</directory>
Features
- Converts directory structures to well-formed XML
- Respects
.gitignorefiles by default - Supports custom ignore and include patterns
- Pretty-printed output by default
- File contents wrapped in CDATA sections
- Pipe-friendly for use with other tools
Why XML?
XML's explicit closing tags make structure unambiguous, unlike YAML's error-prone indentation. File contents can be wrapped in CDATA sections preserving exact formatting, while JSON would require escaping every quote and newline.
Metadata
Release files for xmltree 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xmltree-0.1.1.tar.gz | 16.5 kB | Without provenance | Details for xmltree-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xmltree-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xmltree-0.1.1-py3-none-any.whl |
Total release size: 24.7 kB
Release files / xmltree-0.1.1.tar.gz
| Download URL | xmltree-0.1.1.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8333c18aad426149090730b764ffd67611f5047312b1621c53542f8d5f8cbe82
|
|
BLAKE2b-256 checksum How to use checksums |
1ef483e75eb2bba5ebdbbec609128e4724ae4620c38ca828086a7821094ff6f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.8
|
Release files / xmltree-0.1.1-py3-none-any.whl
| Download URL | xmltree-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
039ed0d1105d2521d902f3257b6ad877ceccd7fad661f00e8b29532ca4105731
|
|
BLAKE2b-256 checksum How to use checksums |
905ff326ce8936b41c216f2ed7832f7dc687faba3844469f081336747174fcdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.8
|
Security for xmltree 0.1.1
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.