BEGIN {print "1..1\n";} END {print "not ok 1\n" unless $loaded;} use XML::DOM; $loaded = 1; print "ok 1\n"; # this test is temporary disabled because # i think i have found a bug in expat that # calls the ExternEnt handler instead of Entity for # external parameter entities exit; my $test = 1; sub assert_ok { my $ok = shift; print "not " unless $ok; ++$test; print "ok $test\n"; $ok; } # my $xml =< %globalInfo; ]> EOF # # Tell XML::Parser to parse the external entities (ParseParamEnt => 1) # Tell XML::DOM::Parser to 'hide' the contents of the external entities # so you see '%globalInfo;' when printing. my $parser = new XML::DOM::Parser( ParseParamEnt => 1, ExpandParamEnt => 0, ErrorContext => 5); my $dom = $parser->parse ($xml); my $domstr = $dom->toString; # Compare output with original file assert_ok ($domstr eq $xml); print "$domstr\n$xml\n";