定制 sclable/xml-lint 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sclable/xml-lint

最新稳定版本:0.9.0

Composer 安装命令:

composer require sclable/xml-lint

包简介

A php cli tool to lint and validate xml files.

README 文档

README

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

Build Status Latest Stable Version Total Downloads License

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

Usage

Installation with Composer

If you'd like to include this library in your project with composer, simply run:

composer require "sclable/xml-lint"

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

xmllint has built in cli help screen:

vendor/bin/xmllint --help

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

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

For the changelog see the CHANGELOG file

License

For the license and copyright see the LICENSE file

统计信息

  • 总下载量: 601.87k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 2
  • 依赖项目数: 20
  • 推荐数: 0

GitHub 信息

  • Stars: 23
  • Watchers: 3
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固