Skip to content

Instantly share code, notes, and snippets.

@claudius108
Last active September 14, 2024 08:55
Show Gist options
  • Save claudius108/8118e77345c09fd55e3e6da454db1dab to your computer and use it in GitHub Desktop.
Save claudius108/8118e77345c09fd55e3e6da454db1dab to your computer and use it in GitHub Desktop.
xmlint commands

check if xml files are well formed

find ./ -name "*.xml" -exec xmllint --noout {} \;

format files in place

find . -name "*.xml" -type f -exec xmllint --encode utf8 --output '{}' --format --noblanks '{}' \;

validate files against a local schema

find . -name "*.xml" -type f -exec xmllint --noout --nowarning --schema ./modules/validation/tei_all.xsd '{}' \; 2>output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment