http://qs321.pair.com?node_id=601018


in reply to Print out an XML file to browser

You should be able to just open foo.xml in your browser by clicking on the file. But if you'd like to output XML from your script to your browser and view it as XML, I think you need to change the Content-Type. I checked the CGI documentation, and it looks like this is how you'd do it:

print start_html(-head=>meta({-http_equiv => 'Content-Type', -content => 'text/xml'}))

Someone please correct me if I am wrong.