更新时间:2023-11-27 23:22:22
SAX 总是在速度上击败 DOM.但是由于您说 XML 文件很小,您可以继续使用 DOM 解析器.您可以做的一件事是创建一个线程池并在其中执行数据库操作.多线程更新将显着提高性能.
SAX always beats DOM at speed. But since you say XML files are small you may proceed with DOM parser. One thing you can do to speedup is create a Thread-Pool and do the database operations in it. Multithreaded updates will significantly improve the performance.