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 https://dropit.3dsecure.net:8443/PIT/DS

The raw response looked like this: <?xml version="1.0" encoding="UTF-8"?>1.0.2YA0fTY+pKUTs3A4AjhdYQ+g==https://dropit.3dsecure.net:9443/PIT/ACSThreeDSecure

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== https://dropit.3dsecure.net:9443/PIT/ACS ThreeDSecure

comments powered by Disqus