Why My XML can't be displayed?

Discussion in 'XML' started by Belinda Wu, Jan 27, 2005.

  1. Belinda Wu

    Belinda Wu Guest

    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 = 8)
    [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?
     
    Belinda Wu, Jan 27, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ThunderMusic
    Replies:
    1
    Views:
    360
    ThunderMusic
    Sep 5, 2006
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    912
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,004
    Smokey Grindel
    Dec 2, 2006
  4. boney
    Replies:
    1
    Views:
    570
  5. ThunderMusic

    Displayed and Saved Images are not the same... WHY??

    ThunderMusic, Sep 5, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    110
    ThunderMusic
    Sep 5, 2006
Loading...

Share This Page