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(1y ago)24664.9k↓43.2%10[3 issues](https://github.com/sclable/xml-lint/issues)[5 PRs](https://github.com/sclable/xml-lint/pulls)20MITPHPPHP 8.1.\*|8.2.\*|8.3.\*|8.4.\*CI failing

Since Nov 20Pushed 6mo 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 1w 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

57

—

FairBetter than 98% of packages

Maintenance56

Moderate activity, may be stable

Popularity48

Moderate usage in the ecosystem

Community30

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

370d 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://avatars.githubusercontent.com/u/8643936?v=4)[sclable.](/maintainers/sclable)[@sclable](https://github.com/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

[laravel/framework

The Laravel Framework.

34.9k556.2M21.4k](/packages/laravel-framework)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k69](/packages/friendsoftypo3-content-blocks)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

55344.7k5](/packages/jolicode-castor)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[testo/testo

A lightweight PHP testing framework.

20319.6k179](/packages/testo-testo)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)

PHPackages © 2026

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