[forwarded submission from a non-member address -- rjk]
From: "Ranga Nathan" <[EMAIL PROTECTED]>
Date: Mon, 25 Feb 2002 19:01:38 -0800
Subject: CGI printing XML
To: <[EMAIL PROTECTED]>
When a CGI scripts prints an XML file to IE, it renders it as plain text!!!
But when it GETs an XML file with the xml extension it renders it with
collapse/expand view. Wonder if anyone has an angle on this. How can one
tell IE from a CGI to collaps/expand? I tried different mime types.. IE
simply seems to ignore it!!!
script is:
#!/usr/local/bin/perl
print <<HERE;
Content-type: text/xml
<?xml version="1.0" ?>
<root>
<elem>
This is element one
</elem>
<elem>
This is element two
</elem>
</root>
HERE
====================================
Ranga Nathan
Reliance Technology
Legacy to Web integration consultancy
Text to web-database-spreadsheet, datamarts
ADABAS, NATURAL, Perl, Apache, Linux, Wintel solutions
Tel: 617 884 9801 Fax: 781 623 5646
http://www.cobolexplorer.com - cobol listings on the web
http://www.any2xml.com - text to anything
http://www.goreliance.com
http://www.adaexplorer.com - ADAREP on the web + stats