How to validate very large XML files?

前端 未结 11 2473
失恋的感觉
失恋的感觉 2020-12-16 15:44

How can I validate a large XML file (>100mb)? I try to open it with IE, FX & GC and it either crashes or doesn\'t do anything.

11条回答
  •  执笔经年
    2020-12-16 16:25

    In Java, and I'm sure in other languages, there are solutions for reading in an entire XML file and processing it as a complete DOM, and solutions that process the XML as a stream in an event-driven way. You would want the second kind of solution, which never loads the entire file in memory. See SAX for a Java solution to the problem.

提交回复
热议问题