Chapter 3. Processing XML and HTML

In the previous chapter, we worked with utilities to create, read, and manipulate Strings. Using regular expressions and the Scanner class described in Chapter 2, we can now write custom parsing programs to extract data from structured text. This works well for simpler content, but using those techniques for very complex structures would involve a significant amount of coding. In this chapter, we will be working with a very common type of structured text—the Extensible Markup Language (XML). We will look at specific techniques for processing XML, generate a parser for a non-XML grammar, and convert an arbitrary ...

Get Wicked Cool Java 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.