concept xml file in category java

appears as: n XML file, XML files, XML file
Java Testing with Spock

This is an excerpt from Manning's book Java Testing with Spock.

2.4.2. Reading an XML file

XML is the lingua franca of large enterprise applications. One of the original marketing points of Java was the handling of XML files. Business web services usually produce some sort of XML dialect, and several custom file formats are XML files under the hood. As with Java, Groovy supports several ways, but explaining them all is outside the scope of this chapter.

This section demonstrates the XmlSlurper way of reading XML files with Groovy. You can use this technique either when you want to read test data from an XML file, or when your Java class writes XML and you want to quickly verify its correctness.[12]