Reading Huge XML File using StAX and XPath

前端 未结 7 1930
轮回少年
轮回少年 2020-12-31 11:35

The input file contains thousands of transactions in XML format which is around 10GB of size. The requirement is to pick each transaction XML based on the user input and sen

7条回答
  •  醉梦人生
    2020-12-31 12:29

    We regularly parse 1GB+ complex XML files by using a SAX parser which does exactly what you described: It extracts partial DOM trees that can be conveniently queried using XPATH.

    I blogged about it here - It's using a SAX not a StAX parser, but may be worth a look at.

提交回复
热议问题