Daniel Hiller

Software engineer greybeard with a history of 20+ years transforming ☕ into useful stuff for others.
Reasons For Developing Without Tests
All posts
Rules for test driven bug fixing

Formatting curl xml result via xmllint

2012-03-13

xml lint format 

So I got fed up recently when reloading a url to check an xml result using Chrome because I was using HTTP basic authentication also. Chrome was annoying me because each time I switched from no auth to auth I had to manually remove all browser data and restart chrome.

So I tried to use curl for that job. The only annoyance was that the xml is not formatted properly.

So xmllint for the rescue

curl 'yoururlhere' | xmllint --format -

and that’s it.


Reasons For Developing Without Tests
All posts
Rules for test driven bug fixing

Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Last update on 2024-11-07. Built by dhiller using Atom (editor), Jekyll (site builder), OneDark vivid (syntax highlighting theme), Webjeda (related posts), Disqus (discussions), Github Pages (hosting), Cloudflare (DNS).