我正在寻找最新的、内存效率高的高性能 java XML 解析 API.我需要解析 3 MB 到 5 MB 的 XML 文件.
I am looking for latest, memory efficient and high-performance java XML parsing API. I need to parse 3 MB to 5 MB XML files.
我对此进行了谷歌搜索,了解到 Sun Java Streaming XML Parser (SJSXP) 和 Woodstox 比 DOM 快得多.萨克斯.两者都使用 StAX API.*这些技术不支持模式验证.
I did google on this and come to know about Sun Java Streaming XML Parser (SJSXP) and Woodstox is much faster than DOM & SAX. Both are using StAX API. *schema validation is not supported by these technologies.
Aalto XML 处理器也实现了 StAX API.
Aalto XML processor is also implements StAX API.
我还没有找到关于这些技术性能的具体发现.
I have not found concrete findings on performance on these technologies.
在内存效率、高性能和易用性方面哪一个是最好的?
Which one will be best in context of memory efficient, high-performance and ease of use ?
这里还有一些可能相关的链接:
Here are some more links that might be relevant:
性能方面:SJSXP 最慢;它只是 Xerces 内部的重新包装,包装在 Stax API 中.这对性能有一些负面影响(因为它并不是真正为拉解析而设计的).伍德斯托克斯快一点;小文档和写作速度更快,解析较长文档时差异更小.
As to performance: SJSXP is the slowest; it's just a repackage internals of Xerces, wrapped in Stax API. This has some negative effects on performance (since it's not really designed for pull parsing). Woodstox is bit faster; much faster for small documents and writing, less difference when parsing longer documents.
到目前为止,Aalto 是三者中最快的,尤其是在解析方面.它通常比 Woodstox 或 SJSXP 快 50% - 100%.一个缺点是它不处理 DTD(因此不处理外部实体;它处理预定义和字符实体).
And Aalto is by far fastest of the three, especially for parsing. It is commonly 50% - 100% faster than either Woodstox or SJSXP. One downside is that it does not handle DTDs (and thereby not external entities; it handles pre-defined and character entities).
免责声明:我是 Woodstox 和 Aalto 的作者;以及 SJSXP 的贡献者(错误修复)
Disclaimer: I am author of Woodstox and Aalto; as well as contributor to SJSXP (bug fixes)
这篇关于Java - XML 解析器性能:Sun Java Streaming XML Parser (SJSXP) vs Woodstox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
上传进度侦听器未触发(Google 驱动器 API)Upload progress listener not fired (Google drive API)(上传进度侦听器未触发(Google 驱动器 API))
使用 Google Drive SDK 将文件保存在特定文件夹中Save file in specific folder with Google Drive SDK(使用 Google Drive SDK 将文件保存在特定文件夹中)
Google Drive Android API - 无效的 DriveId 和 Null ResourcGoogle Drive Android API - Invalid DriveId and Null ResourceId(Google Drive Android API - 无效的 DriveId 和 Null ResourceId)
谷歌驱动api服务账户查看上传文件到谷歌驱动使Google drive api services account view uploaded files to google drive using java(谷歌驱动api服务账户查看上传文件到谷歌驱动使用java
Google Drive 服务帐号返回 403 usageLimitsGoogle Drive service account returns 403 usageLimits(Google Drive 服务帐号返回 403 usageLimits)
com.google.api.client.json.jackson.JacksonFactory;Google Drcom.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example(com.google.api.client.json.jackson.JacksonFactory;Google Drive 示例