XML is not native to Java. Many will disagree, but this is just the simple truth. It’s tedious, messy and generally ugly - specially compares to Groovy or Scala.
However, if you DO need to use XML in Java, do yourself a favour and use java-xmlbuilder. I’ve tried it on easy-weight tasks, and it’s by far the simplest most straight-forward XML tool for Java I’ve used so far.