如何从Java中的xml文件中提取一大串字符 [英] How to extract a big list of characters from xml file in Java

查看:81
本文介绍了如何从Java中的xml文件中提取一大串字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很大的xml文件,我不想解析它,我只想存储<information>...</information>之间的每个字符,它们是xml文件中的标签.

I have a big xml file and I do not wish to parse it, I just want to store every single character between <information>...</information>, which are tags inside the xml file.

我该怎么做?

推荐答案

如果问题是您尝试提取的数据可以容纳在内存中,但是整个XML文件都无法容纳,则可以使用流解析器,例如为 XPP .

If the problem is that the data you're trying to extract will fit in memory, but the entire XML file won't, then use a streaming parser such as XPP.

这篇关于如何从Java中的xml文件中提取一大串字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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