added pretty_xml()