Skip to content

Instantly share code, notes, and snippets.

@Licenser
Created April 8, 2010 18:08
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 Licenser/360341 to your computer and use it in GitHub Desktop.
Save Licenser/360341 to your computer and use it in GitHub Desktop.
(defn nv-startparse [s ch]
(let [spf (. SAXParserFactory newInstance)]
(doto spf
(.setValidating false)
(.setSchema nil)
(.setFeature "http://xml.org/sax/features/namespaces", false)
(.setFeature "http://xml.org/sax/features/validation", false)
(.setFeature "http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false)
(.setFeature "http://apache.org/xml/features/nonvalidating/load-external-dtd", false))
(.. spf newSAXParser (parse s ch))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment