XML (.xsd) feed validation against a schema

前端 未结 2 1099
后悔当初
后悔当初 2020-12-24 03:23

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

2条回答
  •  别那么骄傲
    2020-12-24 03:44

    The python snippet is good, but an alternative is to use xmllint:

    xmllint -schema sample.xsd --noout sample.xml
    

提交回复
热议问题