PHPackages                             sclable/xml-lint - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. sclable/xml-lint

ActiveLibrary[CLI &amp; Console](/categories/cli)

sclable/xml-lint
================

A php cli tool to lint and validate xml files.

0.9.0(9mo ago)24626.9k↓17.5%10[5 PRs](https://github.com/sclable/xml-lint/pulls)20MITPHPPHP 8.1.\*|8.2.\*|8.3.\*|8.4.\*CI passing

Since Nov 20Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/sclable/xml-lint)[ Packagist](https://packagist.org/packages/sclable/xml-lint)[ RSS](/packages/sclable-xml-lint/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (20)

Sclable XML Lint
================

[](#sclable-xml-lint)

A php tool to lint and validate xml files from the commandline.

[![Build Status](https://camo.githubusercontent.com/0cd4aa46090a18f67a44405210862bd50131e09b8310f6a7759ae3dadfbd18d0/68747470733a2f2f7472617669732d63692e636f6d2f73636c61626c652f786d6c2d6c696e742e7376673f6272616e63683d6d61696e)](https://travis-ci.com/sclable/xml-lint) [![Latest Stable Version](https://camo.githubusercontent.com/bfb32e35b944e761bb6dda29193dd625860174faee4c176b4b05e27dcdab92e9/68747470733a2f2f706f7365722e707567782e6f72672f73636c61626c652f786d6c2d6c696e742f76)](//packagist.org/packages/sclable/xml-lint) [![Total Downloads](https://camo.githubusercontent.com/2a0a593b4c3c98f9f17b7f3e5ee8f859ff6364ffe77f39c653cb304b266f4ddf/68747470733a2f2f706f7365722e707567782e6f72672f73636c61626c652f786d6c2d6c696e742f646f776e6c6f616473)](//packagist.org/packages/sclable/xml-lint) [![License](https://camo.githubusercontent.com/28f130c984e82d8d3dedf3e783a2122705200d963439be2994597733e0d90a62/68747470733a2f2f706f7365722e707567782e6f72672f73636c61626c652f786d6c2d6c696e742f6c6963656e7365)](//packagist.org/packages/sclable/xml-lint)

XML Lint checks the syntax of any xml files and validates the file against the XSD schema defined in the file.

Usage
-----

[](#usage)

### Installation with Composer

[](#installation-with-composer)

If you'd like to include this library in your project with [composer](https://getcomposer.org/), simply run:

```
composer require "sclable/xml-lint"

```

### Command Line Usage

[](#command-line-usage)

To lint a single xml file:

```
vendor/bin/xmllint path/to/file.xml

```

To lint a directory and all its subdirectories:

```
vendor/bin/xmllint path/to/dir

```

#### Help

[](#help)

`xmllint` has built in cli help screen:

```
vendor/bin/xmllint --help

```

#### Options

[](#options)

- `-v` be verbose, display the filename of the current file to lint
- `-r 0` don't search recursive (if the argument is a directory)
- `-e name` exclude files or directories containing 'name'
- `-s` skip the xsd validation

Development
-----------

[](#development)

### Run tests

[](#run-tests)

```
# check code style
php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run -v

# run tests
php vendor/bin/phpunit
php vendor/bin/behat
```

Using docker:

```
# Example
docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" .

# PHP_VERSION: choose between 8.1, 8.2, 8.3 and 8.4
docker build -t xml-lint:php-8.1 --build-arg=PHP_VERSION="8.1" .
docker build -t xml-lint:php-8.2 --build-arg=PHP_VERSION="8.2" .
docker build -t xml-lint:php-8.3 --build-arg=PHP_VERSION="8.3" .
docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" .

# Run with code style check
docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" --build-arg=PHP_CS_FIXER=true .

# Use this image to run xml-lint:
cd tests/functional/_testdata
docker run -it --rm -v "$PWD":/var/src -w /var/src xml-lint:php-8.4 -r -v -- ./
```

Changelog
---------

[](#changelog)

For the changelog see the [CHANGELOG](CHANGELOG) file

License
-------

[](#license)

For the license and copyright see the [LICENSE](LICENSE) file

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance70

Regular maintenance activity

Popularity48

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 69.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~296 days

Recently: every ~311 days

Total

13

Last Release

279d ago

PHP version history (6 changes)0.3.0PHP 7.2.\*|7.3.\*|7.4.\*

0.4.0PHP 7.3.\*|7.4.\*|8.0.\*

0.5.0PHP 7.4.\*|8.0.\*|8.1.\*

0.6.0PHP 8.0.\*|8.1.\*|8.2.\*

0.7.0PHP 8.0.\*|8.1.\*|8.2.\*|8.3.\*

0.9.0PHP 8.1.\*|8.2.\*|8.3.\*|8.4.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/5db693986df6c113719ff782555de61014bfba827340d5baf5eb597327259df1?d=identicon)[sclable](/maintainers/sclable)

---

Top Contributors

[![m-bymike](https://avatars.githubusercontent.com/u/4008663?v=4)](https://github.com/m-bymike "m-bymike (61 commits)")[![hakan0xFF](https://avatars.githubusercontent.com/u/1721527?v=4)](https://github.com/hakan0xFF "hakan0xFF (20 commits)")[![ischmittis](https://avatars.githubusercontent.com/u/904789?v=4)](https://github.com/ischmittis "ischmittis (3 commits)")[![christopher-hopper](https://avatars.githubusercontent.com/u/452515?v=4)](https://github.com/christopher-hopper "christopher-hopper (2 commits)")[![ramunasd](https://avatars.githubusercontent.com/u/150403?v=4)](https://github.com/ramunasd "ramunasd (1 commits)")[![thomashohn](https://avatars.githubusercontent.com/u/3414869?v=4)](https://github.com/thomashohn "thomashohn (1 commits)")

---

Tags

clicommandlinecomposerphpxml-filesxml-schemaxmllintxsdclixmllintxsdxml schema

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sclable-xml-lint/health.svg)

```
[![Health](https://phpackages.com/badges/sclable-xml-lint/health.svg)](https://phpackages.com/packages/sclable-xml-lint)
```

###  Alternatives

[n98/magerun

Tools for managing Magento projects and installations

1.4k264.7k7](/packages/n98-magerun)[n98/magerun2

Tools for managing Magento projects and installations

928244.3k6](/packages/n98-magerun2)[laminas/laminas-cli

Command-line interface for Laminas projects

563.7M54](/packages/laminas-laminas-cli)[j13k/yaml-lint

A compact command line utility for checking YAML file syntax

161.1M19](/packages/j13k-yaml-lint)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1322.1k12](/packages/mahocommerce-maho)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
