xmllint : validate an XML file against two XSD schemas (envelope / payload)

前端 未结 3 998
甜味超标
甜味超标 2021-02-02 13:04

I am using xmllint to do some validations and I have an XML instance document which needs to validate against two schemas: one for the outer \"envelope\" (which includes an

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-02 13:29

    If you had an import element in your A.xsd, right after opening the schema tag,

    
    

    then you could pass A.xsd to xmllint and it would work with:

    xmllint -schema A.xsd ab.xml
    

提交回复
热议问题