line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Microformat::Plugin::Parser::XML; |
2
|
4
|
|
|
4
|
|
4397
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
136
|
|
3
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
95
|
|
4
|
4
|
|
|
4
|
|
1726
|
use XML::TreeBuilder; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub parse { |
7
|
|
|
|
|
|
|
my $c = shift; |
8
|
|
|
|
|
|
|
if (!$c->tree and $c->opts->{content_type} =~ /xml/i) { |
9
|
|
|
|
|
|
|
my $tree = XML::TreeBuilder->new; |
10
|
|
|
|
|
|
|
$tree->parse($c->content); |
11
|
|
|
|
|
|
|
$c->tree($tree); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
return $c->NEXT::parse(@_); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Text::Microformat::Plugin::Parser::XML - XML parser plugin for Text::Microformat |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SEE ALSO |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
L |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 AUTHOR |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Keith Grennan, C<< >> |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 BUGS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Log bugs and feature requests here: L |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SUPPORT |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Project homepage: L |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Copyright 2007 Keith Grennan, all rights reserved. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
41
|
|
|
|
|
|
|
under the same terms as Perl itself. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |