Bugz
Bugz

Reputation: 118

XSD validation for Android

I need to validate an incoming XML against my XSD on Android. I first tried JAXB but found I got Darvik issues. Now I'm planning to use SimpleXML. Can Simple handle validation? If so how?

Also the XSD will reside on the device with the XML and not as a URL.

Upvotes: 3

Views: 496

Answers (1)

dilix
dilix

Reputation: 3893

You can use xerces and native schema validation (in java) in adnroid - you have to download xerces sources and (after some simple manipulations) include it to your own code - you will be able to use DocumentBuilderFactory.setShema method.

https://stackoverflow.com/questions/13142567/xml-schema-validation-xmlsignature-with-xerces-in-android

Upvotes: 1

Related Questions