xmllintコマンドで整形できます。 xmllint --format example.xml パイプで使うなら | xmllint --format - こんな感じ $ curl --silent 'http://learningenglish.voanews.com/podcast/?count=4&zoneId=3521' | xmllint --format - <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <channel> <title>As It Is - Voice of America</title> <
![改行されてないXMLファイルを見やすく整形する方法 · DQNEO日記](https://cdn-ak-scissors.b.st-hatena.com/image/square/8f7de7c0278993661a11fbc3637f96292ba773aa/height=288;version=1;width=512/http%3A%2F%2Fdqn.sakusakutto.jp%2Fimages%2Fkali.jpg)