libxml CLI frontend.
Because it is official to the main XML library, looks like the most robust option out there.
Usage:
xmllint min.xml
Checks if:
- well formed
- entity loops like the billion laughs attack
Does not check for DTD validity: use --valid
for that.
Pretty print:
xmllint --format min.xml
Also check DTD validity:
xmllint --format min.xml
Check XSD validity:
xmllint --schema schema.xsd min.xml
Allows validating large files: http://stackoverflow.com/questions/7528249/tools-to-validate-large-xml-100mb-file/32992580#32992580
xmlstarlet
solved it: http://stackoverflow.com/a/32991889/895245
Validation: --stream
.
XPATH Queries: http://stackoverflow.com/questions/30305724/how-to-do-command-line-xpath-queries-in-huge-xml-files TODO impossible?