A broken sitemap fails quietly. Search engines skip what they cannot parse and rarely say why, so a tree can rot for months: a lastmod of 2026-02-30 that looks like a date and is not one, a file that crept past 50,000 URLs, an index that lists itself, half the URLs pointing at a staging host after a migration.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.
Run the checked-in example
git clone https://github.com/edilec/xml-sitemap-validator.git
cd xml-sitemap-validator
node bin/xml-sitemap-validator.mjs --sitemap examples/clean/sitemap-index.xml --base-url https://example.com/sitemap-index.xmlRead the result
Without --json the same report is printed as a human-readable summary.
Where this check stops
Also out of scope by design: no network access, no auto-fix and no writes. The tool is read-only, reads only inside --root, and an index pointing outside that directory, or back at itself, is reported rather than followed.
Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.
Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.