Skip to content

Instantly share code, notes, and snippets.

@elarkin
Created July 19, 2013 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elarkin/6039403 to your computer and use it in GitHub Desktop.
Save elarkin/6039403 to your computer and use it in GitHub Desktop.
answer a question
(ns something.something
[:import [javax.xml.validation SchemaFactory Validator]
[javax.xml.transform.stream StreamSource]])
(defn something []
(let [factory (SchemaFactory/newInstance "http://www.w3.org/2001/XMLSchema")
file (clojure.java.io/file "simple.xsd")
schema (.newSchema factory file)
validator (.newValidator schema )
stream-source (StreamSource. "simple-err.xml")]
(.validate validator stream-source)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment