The first six chapters focus on XML and the last six chapters focus on JSON -- there is a clean separation between the two. I present XML first because it predates JSON and because Java SE provides API support for XML.
I have some thoughts on what to include in a third edition of the book (if there is a third edition). For example, I'd include a chapter that combines XML and JSON because they complement each other. JSON is great for data interchange, whereas XML is great for data modelling.
Actually, I tend to group YAML among them as well. I'm a big YAML fan these days. It's used by Puppet/Hiera, Ansible, and doubtless other popular systems that I can't remember right now (Node Express?).
If I'm not mistaken, you don't get natural support for client-side parsing of YAML, but it's great for simple data, especially if it's hand-written.
Sometimes the only way things ever got fixed is because people became uncomfortable.