Saturday, 12 December 2015

XML : SchemaFactory.newInstance(XMLConstants.W3C_XML_Schema_NS_URI) throws IllegalArgumentException

I created a SchemaFactory object for the purpose of validating a xml file. When I initialise it like this in my android app: SchemaFactory schemaFact=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); the app crashes and I find this in LogCat: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema I even tried with different Constants in XMLConstants. All throw the same error. Any help on how to solve this is appreciated. Thank you in advance.

No comments:

Post a Comment