我在具有以下要求的應用程序的工作處理XML文件 -與龐大的數據
- 從服務器下載一個ZIP文件。
- 解壓縮ZIP文件,從該文件獲取內容(XML格式)爲字符串。
- 將此內容傳遞給另一個解析和進一步處理的方法。
現在,我的關注點是XML文件的大小可以說是'100MB',而我的JVM只有512 MB的內存,所以我怎樣才能將這些內容加入到塊中並傳遞給Parsing和然後將數據插入到PL/SQL表中。
由於可以同時運行多個請求並考慮512MB內存,因此最好能夠處理該請求。
如何將數據獲取到Chunks中並將其作爲Stream傳遞給XML解析。
dupe of http://stackoverflow.com/questions/504689/big-xml-file-and-outofmemoryerror http://stackoverflow.com/questions/1913551/huge-xml-file-do-i-read-一個頁面和每個進程處理它http://stackoverflow.com/questions/23106/best-method-to-parse-various-custom-xml-documents-in-java http:// stackoverflow。 com/search?q = huge + xml + java – voyager 2010-03-19 21:30:01
另請參閱:http://stackoverflow.com/questions/1134189/can-jaxb-parse-large-xml-files-in-chunks – Ash 2010-03-19 21:31:40
另請參閱http:// stackoverflow .com/questions/2013996/large-xml-files-and-pagination-is-it-possible – 2010-03-19 22:47:24