[Israel.pm] returning XML from CGI

Issac Goldstand margol at beamartyr.net
Tue Sep 21 01:28:04 PDT 2004

----- Original Message ----- 
From: "Shlomo Yona" <shlomo at cs.haifa.ac.il>
To: "Perl in Israel" <perl at perl.org.il>
Sent: Tuesday, September 21, 2004 11:20 AM
Subject: Re: [Israel.pm] returning XML from CGI

> On Tue, 21 Sep 2004, Issac Goldstand wrote:
>> Um.  Many browsers display a blank page if there's a problem with 
>> external stuff too, like Schema/DTD, or XSL, etc...  Ditto if the HTTP 
>> headers aren't perfect.
> There's nothing in the XML to trigger such checks so I am
> sure this isn't it. The header is the primary suspect I
> think.
>> Is there another copy up that shows the "blank" XML?
> I don't understand the question.

Is there another copy of your script that shows the "raw" xml, without being 
embedded in the HTML?

I tried taking your output and doing something like:
use CGI qw(header);

my $xml= <<EOF;
<?xml version="1.0" encoding="UTF-8"?>

print header(-type=>'text/xml', charset=>'UTF-8');
  print $xml;

And it worked fine.  I'm using Firefox 0.9.2 amnd MSIE 6, and service with 
Apache 2.0.48 for Win32 and ActivePerl 5.8.4 (i happened across the original 
email on one of my windows systems) - both browsers rendered the xml in that 
neat collapsable manner.  So it sounds like your server is mucking something 

> -- 
> Shlomo Yona
> shlomo at cs.haifa.ac.il
> http://cs.haifa.ac.il/~shlomo/
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl

More information about the Perl mailing list