Groovy XML & JSON

Parsing and generating XML and JSON in Groovy. Tutorials on XmlSlurper, XmlParser, MarkupBuilder, JsonSlurper, JsonBuilder, and REST APIs.

Groovy XmlParser vs XmlSlurper – Complete Comparison with 12 Examples

Compare Groovy XmlParser and XmlSlurper with 12 side-by-side examples. Learn when to use each, performance differences, and migration tips. Groovy 5.x. “There are only two hard things in Computer Science: cache invalidation, naming things, and choosing the right XML parser.” Every Java Developer, Eventually Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 20 minutes Groovy gives you two built-in XML parsers: Groovy XmlParser and XmlSlurper. They look similar at first glance ... Read More