Summary

This chapter covered the concepts behind parsing, SAX, JAXP, and AElfred. You can now use the available XML parsers to ingest and break down XML documents to extract the pertinent information for your application.

The two activities involved in parsing are lexical analysis and grammatical analysis. Lexical analysis was examined in detail with two sample programs: an initial obvious but incorrect tokenizer and then a refined approach. Additionally, this section included the requirements the XML specification levies on all XML processors.

The Simple API for XML (SAX) is a simple, event-based API for parsing XML documents. This was the largest section in the chapter because it explained and demonstrated every interface and class in the API. ...

Get XML Development with Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.