Chapter 8Working with XML

Working with XML can be tedious. Working with traditional Java APIs and libraries to create and parse XML documents tends to lower our spirits. And navigating the document hierarchy using the DOM API is sure to drive us insane.

Groovy brings relief for both parsing and creating XML documents. We already saw a few ways to create XML documents. We’ll revisit that topic in this chapter and learn to use three different facilities to parse XML documents, with varying degrees of convenience and efficiency. We will also browse Groovy’s support for creating XML documents.

Get Programming Groovy 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.