How to validate XML against XSD 1.1 in Java?

后端 未结 4 569
花落未央
花落未央 2020-12-01 14:55

What is the best way to validate XML files against XML Schema 1.1 in Java?

I took the code from this tutorial and changed the line where it looks up the factory to u

4条回答
  •  执笔经年
    2020-12-01 15:15

    After searching for a while, this tutorial contains these dependency worked for me:

    
        org.exist-db.thirdparty.xerces
        xercesImpl
        2.12.0
        xml-schema-1.1
    
    
    
    
        org.exist-db.thirdparty.org.eclipse.wst.xml
        xpath2
        1.2.0
        runtime
    
    
        edu.princeton.cup
        java-cup
        10k
        runtime
    
    

    Unfortunately, these libraries don't seem to be official. So, use it at your own risk.

提交回复
热议问题