A php tool to lint and validate xml files from the commandline.
XML Lint checks the syntax of any xml files and validates the file against the XSD schema defined in the file.
If you'd like to include this library in your project with composer, simply run:
composer require "sclable/xml-lint"
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
xmllint
has built in cli help screen:
vendor/bin/xmllint --help
-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
For the changelog see the CHANGELOG file
For the license and copyright see the LICENSE file