Created
          September 23, 2011 05:47 
        
      - 
      
- 
        Save jprudent/1236827 to your computer and use it in GitHub Desktop. 
    How to read XML documents without validation
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | object MyXML extends XMLLoader[Elem] { | |
| override def parser: SAXParser = { | |
| val f = javax.xml.parsers.SAXParserFactory.newInstance() | |
| f.setNamespaceAware(false) | |
| f.setValidating(false) | |
| f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); | |
| f.setFeature("http://apache.org/xml/features/validation/schema", false); | |
| f.newSAXParser() | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment