[Israel.pm] returning XML from CGI

Issac Goldstand margol at beamartyr.net
Tue Sep 21 01:08:23 PDT 2004

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 
Is there another copy up that shows the "blank" XML?

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

> Hello,
> I have a CGI script that accepts some parameters from a form
> and is supposed to return an XML document.
> I'm able to return an HTML with the XML document inlined
> (after some entity manipulation: mainly transforming < to
> &lt; and > to &gt;), but I don't seem to be able to return
> an XML document as the HTTP response in a way that is
> recognized by the browser as an XML file.
> This:
>  print header(-type=>'text/xml', charset=>'UTF-8');
>  print $xml_document
> should have done the trick but all the browser shows me is a
> blank page. The only way to view the actual document that
> was returned is by viewing the page source.
> Is there something that I'm missing here?
> Thanks.
> -- 
> 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