高分求解dom4j装载30M左右XML文件内存溢出
我用的是public Document read(String fileName) throws MalformedURLException, DocumentException
{
SAXReader reader = new SAXReader();
Document document = null;
try {
document = reader.read(new FileInputStream(fileName));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return document;
}
这样得到document内存就溢出了,我对dom4jAPI不熟悉,是个新手,请用过dom4j的大侠们,指点迷津,最好是有代码传上,只要能读成功30M的文件,我给100分,十分感谢