Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Why My XML can't be displayed?

Reply
Thread Tools

Why My XML can't be displayed?

 
 
Belinda Wu
Guest
Posts: n/a
 
      01-27-2005
I have a perl cgi script it can generate a xml file then I'd like to
display this xml file on the web. Code looks like below.

use CGI::Carp qw(fatalsToBrowser);
use XML::Writer;
my $xmlWri = XML::Writer->new( );
print "Content-type: text/xml\n\n";
$xmlWri->xmlDecl ('UTF-8', 'yes');
$xmlWri->pi('xml-stylesheet', 'type="text/xsl" href="Standard.xsl"');
$xmlWri->startTag('TEST");
.....
.....
$xmlWri->endTag("TEST");


I get error infromation from Apache errlog file
[Wed Jan 26 18:58:37 2005] access to
/opt/apache/cgi-bin/cats/Reports/Standard.x
sl failed for belinda.chn.agilent.com, reason: Premature end of script
heade
rs
exec of /opt/apache/cgi-bin/cats/Reports/Standard.xsl failed, reason:
Exec f
orma
t error (errno =
[Wed Jan 26 18:58:37 2005] access to
/opt/apache/cgi-bin/cats/Reports/Standa
rd.x
sl failed for belinda.chn.agilent.com, reason: Premature end of script
heade
rs


I got error message from IE
The stylesheet does not contain a document element. The stylesheet may
be empty, or it may not be a well-formed XML documen...



I'm trying to save the xml, generated by that script, under htdocs it
can be displayed correctly.

Can somebody tell me why this?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Cisco 2611 and Cisco 1721 : Why , why , why ????? sam@nospam.org Cisco 10 05-01-2005 08:49 AM



Advertisments