Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: DOM XML parser that supports FEATURE_SECURE_PROCESSING?

We have a requirement that our XML parser must support XMLConstants.FEATURE_SECURE_PROCESSING.

Unfortunately, the XML parser that is bundled with Android does not. I cannot find any XML packages that conform to this standard - do any exist?

So far:

  • Xerces is not supported on Android.
  • dom4j does not contain a DocumentBuilder or DocumentBuilderFactory?
like image 493
Elliot Chance Avatar asked Oct 26 '15 03:10

Elliot Chance


1 Answers

'xerces-for-android' did the trick. We can use the SetFeature method from DocumentBuilderFactory of xerces to apply FEATURE_SECURE_PROCESSING.

Had to download source and build the jar from; https://code.google.com/p/xerces-for-android/

like image 108
AbhayM Avatar answered Oct 31 '22 12:10

AbhayM