Android:支持FEATURE_SECURE_PROCESSING的DOM XML解析器? [英] Android: DOM XML parser that supports FEATURE_SECURE_PROCESSING?
问题描述
我们有一个要求,我们的XML解析器必须支持 XMLConstants.FEATURE_SECURE_PROCESSING
。
We have a requirement that our XML parser must support XMLConstants.FEATURE_SECURE_PROCESSING
.
不幸的是,XML解析器与Android捆绑在一起的没有。我找不到符合此标准的XML包-是否存在?
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?
到目前为止:
- Android不支持Xerces 。
- dom4j 不包含
DocumentBuilder
或DocumentBuilderFactory
?
- Xerces is not supported on Android.
- dom4j does not contain a
DocumentBuilder
orDocumentBuilderFactory
?
推荐答案
'xerces-for-android'达到了目的。我们可以使用xerces的 DocumentBuilderFactory
中的 SetFeature
方法来应用 FEATURE_SECURE_PROCESSING
。
'xerces-for-android' did the trick. We can use the SetFeature
method from DocumentBuilderFactory
of xerces to apply FEATURE_SECURE_PROCESSING
.
必须下载源代码并从中构建jar; https://code.google.com/p/xerces-for-android/
Had to download source and build the jar from; https://code.google.com/p/xerces-for-android/
这篇关于Android:支持FEATURE_SECURE_PROCESSING的DOM XML解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!