What's the best way to validate an XML file against an XSD file?

前端 未结 13 1475
滥情空心
滥情空心 2020-11-22 07:37

I\'m generating some xml files that needs to conform to an xsd file that was given to me. What\'s the best way to verify they conform?

13条回答
  •  故里飘歌
    2020-11-22 08:41

    We build our project using ant, so we can use the schemavalidate task to check our config files:

     
        
    
    

    Now naughty config files will fail our build!

    http://ant.apache.org/manual/Tasks/schemavalidate.html

提交回复
热议问题