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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Print out an XML file to browser
by lakeTrout (Scribe) on Feb 20, 2007 at 04:37 UTC | |
by virtualsue (Vicar) on Feb 20, 2007 at 05:56 UTC | |
by lakeTrout (Scribe) on Feb 20, 2007 at 06:58 UTC | |
by been42 (Curate) on Feb 20, 2007 at 14:55 UTC | |
by siva kumar (Pilgrim) on Feb 20, 2007 at 05:41 UTC | |
by virtualsue (Vicar) on Feb 20, 2007 at 06:26 UTC | |
by lakeTrout (Scribe) on Feb 20, 2007 at 05:55 UTC | |
Re^2: Print out an XML file to browser
by dorward (Curate) on Feb 20, 2007 at 11:50 UTC |
In Section
Seekers of Perl Wisdom