line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*-
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package XML::EP::Formatter::HTML;
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$XML::EP::Formatter::HTML = '0.01';
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new {
|
9
|
0
|
|
|
0
|
0
|
|
my $proto = shift;
|
10
|
0
|
0
|
|
|
|
|
my $self = (@_ == 1) ? \%{ shift() } : { @_ };
|
|
0
|
|
|
|
|
|
|
11
|
0
|
|
0
|
|
|
|
bless($self, (ref($proto) || $proto));
|
12
|
|
|
|
|
|
|
}
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub Format {
|
15
|
0
|
|
|
0
|
0
|
|
my $self = shift; my $ep = shift; my $xml = shift;
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $response = $ep->Response();
|
17
|
0
|
0
|
|
|
|
|
$response->ContentType("text/html") unless $response->ContentType();
|
18
|
0
|
|
|
|
|
|
my $fh = $ep->Request()->FileHandle();
|
19
|
0
|
|
|
0
|
|
|
XML::DOM::setTagCompression(sub {1});
|
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
$xml->setXMLDecl(undef);
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
print $fh $ep->Response->Headers();
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
$xml->printToFileHandle($fh);
|
26
|
|
|
|
|
|
|
}
|