In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] wrote:

> Need a little help
> 
> I am using
> 
> #!/usr/bin/perl -w
> 
> use CGI qw/:cgi-lib/;
> 
> print PrintHeader();
> 
> 
> This gives a result of 
> 
> Content-Type: text/html
> 
> I need it to be
> 
> Content-Type: text/xml
> 
> How do I do that.
> 
> Jason

see <http://stein.cshl.org/WWW/CGI/cgi_docs.html#html> and the 
subsection on -dtd and -head

a *seriously* verbose description of the proper doctype header for XML 
is at <http://www.w3.org/XML/1998/06/xmlspec.dtd> and you *should* use 
it. for example

<!DOCTYPE spec PUBLIC
       "-//W3C//DTD Specification V2.1//EN"
       "http://www.w3.org/XML/1998/06/xmlspec-v21.dtd";>

CGI.pm emits an XHTML header by default, unless you specify -no_xhtml in 
the invocation of use CGI qw/ :blah -no_xhtml /;

-- 
Scott R. Godin            | e-mail : [EMAIL PROTECTED]
Laughing Dragon Services  |    web : http://www.webdragon.net/
It is not necessary to cc: me via e-mail unless you mean to speak off-group.
I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to