Pretty print xml file in bash. The simplest way is to use xmllint, since most of your environments use xml linter and that script is already installed on your system.
Source code viewer
xmllint your_file.xml --format -o ouput_file.xmlProgramming Language: Bash