user591410
user591410

Reputation: 3201

Android XML Schema Validation

I am trying to validate the XML using a local schema file (xsd) in an application that will be run on android. I followed the instructions on the android developer docs here.

I am able to validate my xml file in java but it raises an IllegalArgument exception (code mentioned below) when run on android.

SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);

Please advice on how to proceed with XML schema validation on android. Are there any schema validation libraries that work on android ? Thanks in advance.

Upvotes: 2

Views: 3433

Answers (1)

Gangnus
Gangnus

Reputation: 24474

The API is here in Android, but not the implementation (more). So the only way is to add the functionality by some external jar, Crimson or Xerces. Not a great problem. Have you looked here?

Upvotes: 2

Related Questions