dear members,

i'm using xml::dom E.Ray's/J.McIntosh's XML&Perl book offers( i'm reading the german edition) a few examples. one of them in chapter 7 deals with processing an xhtml-file. i have substituted the xhml-file by a wellformed and valid xml-file. starting the perlscript bsp00_dom1.pl on the commandline it works fine and prints the tree which is described in the xml-file.

next step: because i want to use xml-processing-instructions in a web-environment i'm using the cgi-module. and now first surprise: using xml:dom-methods in a cgi-file, instructions, which have had in a *.pl-file the result to print the whole tree on the commandline, the browser displays only the content of the xml-elements of my xml-file but i would like to return the whole tree. here is some code to illustrate the problem.

if ($Q::xmldatei ne '') {
$dom_parser = new XML::DOM::Parser;
$doc = $dom_parser->parsefile("$Q::xmldatei");
print    $q->hr;
print    $doc->toString;
print    $q->hr;

the instruction print $doc->toString displays the whole tree on the commandline. using the same instructions in a web-environment using the cgi-module you only get the content of the elements. does anybody know the reason why?

best regards
claus-peter becke

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to