I like this print_header() function idea :) Thus, I wonder why is not used in all the other files?

Anyway, to remarks:

* I'd suggest adding a `rm headers.out` after cat, for the sake of cleanness
* I would suggest to rename to print_with_headers(), because that is what is actually doing (it prints not only headers, but also the xmllint-ed output)