Answering Key Questions
Choosing the parsing method is a very important decision in the case of any serious XML application. As explained in the overview of the SAXDOMIX framework, you may use SAX or DOM depending on whether you need serial or random access to the document's content, but you may also mix the two methods in order to improve the scalability and performance of your application. With SAXDOMIX, you get random access to document fragments (DOM sub-trees) that are acquired serially like the SAX events.
Once you decide what parsing method is appropriate for your application, many other questions are raised:
- How fast are the parsing methods?
- How much memory resources do they need?
- Will the XML parsing be scalable?
- How does the XML validation affect the performance?
- How does the namespace usage affect the performance?
- What is the best XML parser?
- What JDK version should be used?
This benchmark will answer the above questions.
Designing the Benchmark
Generating the XML Documents
Running the Benchmark
Parsing the XML Documents
Understanding the Results
Why Testing with Multiple Versions?
Reading the Charts
Comparing Parsing Methods
Using Namespaces and Validation
Choosing the Parser
Choosing the JDK
XML Parse Methods: SAX versus DOM
XML Parsers: Xerces versus Crimson
XML Namespaces and XML Validation