Putting in configurations and using them through YAML has become so easy, a piece of cake. Whoever that comes from XML background, they would for sure appreciate the ease and flexibility offered by YAML.
The official documentation on YAML says, “YAML Ain’t Markup Language” (abbreviated YAML) is a data serialization language designed to be human-friendly and work well with modern programming languages for common everyday tasks. This specification is both an introduction to the YAML language and the concepts supporting it, and also a complete specification of the information needed to develop applications for processing YAML.
YAML is primarily a data serialization language. XML was designed to be backwards compatible with the Standard Generalized Markup Language (SGML), which was designed to support structured documentation. XML therefore had many design constraints placed on it that YAML does not share. XML is a pioneer in many domains, YAML is the result of lessons learned from XML and other technologies.
Unlike XML, we don’t have opening/closing tags. We don’t need to take care of parsing the xml, unmarshalling it, in order to get the data. With YAML, we have nested properties, in a text file, that can be used the way we would do for accessing properties from an object.
A very simple example of YAML file I used for docker is below: