Parsing an XML Document with Java
As noted earlier, there are two basic interfaces to XML parsers: SAX, which supports low-overhead, event-based processing, and DOM, which represents the result of parsing in a tree data structure that can be used with XML (or HTML).
Let's look at how to parse XML with these interfaces. Later chapters will discuss in detail how to work with the results of this parsing: Chapter 15 will present DOM, and Chapter 16 will present SAX. This chapter will only summarize the most important non-standard features and show you how to get started. You need to see those nonstandard features to use DOM, and you'll need to read about DOM or SAX to write a useful program!
To make things easier, you'll learn how to do one particular ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access