I have a XML file and I have a XML schema. I want to validate the file against that schema and check if it adheres to that. I am using python but am open to any language for
The python snippet is good, but an alternative is to use xmllint:
xmllint -schema sample.xsd --noout sample.xml