处理大型xml文件 [英] Processing large xml files

查看:113
本文介绍了处理大型xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含许多子元素的大型xml文件。我想能够运行一些xpath查询。我尝试在java中使用vtd-xml,但有时会出现outofmemory错误,因为xml非常大以适应内存。是否有另一种处理如此大的xml的方法。

I am having a large xml file which contains many sub elements. I want to able to run some xpath queries. I tried using vtd-xml in java, but I get outofmemory error sometimes, because the xml is so large to fit into memory. Is there an alternative way of processing such large xml's.

推荐答案

尝试 http://code.google.com/p/jlibs/wiki/XMLDog

它使用sax执行xpath而不创建xml文档的内存表示。

it executes xpaths using sax without creating in-memory representation of xml documents.

这篇关于处理大型xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆