my notes online

home tags

Pretty Printing XML with xmllint

20 Nov 2012

Yesterday I was doing some tests towards Visa 3-D Secure test directory url, which responds in XML format. curl -s -X POST -d @vereq.xml --cert visa.crt \ --key visa.key

The raw response looked like this: <?xml version="1.0" encoding="UTF-8"?>1.0.2YA0fTY+pKUTs3A4AjhdYQ+g==

I used xmllint to pretty print the raw response: xmllint -format veres.xml --output -

and the pretty printed looked like this: <?xml version="1.0" encoding="UTF-8"?> 1.0.2 Y A0fTY+pKUTv+96d4nonZQA== ThreeDSecure

comments powered by Disqus