Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Formatting XML or JSON
# resource -
# Formatting XML
cat unformatted.xml | xmllint --format - > formatted.xml
# Formatting JSON
cat unformatted.json | python -m json.tool > formatted.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment