line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Session.pm 18 2008-05-05 23:55:18Z jabra $ |
2
|
|
|
|
|
|
|
package NexposeSimpleXML::Parser::Session; |
3
|
|
|
|
|
|
|
{ |
4
|
2
|
|
|
2
|
|
13
|
use Object::InsideOut; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
14
|
|
5
|
2
|
|
|
2
|
|
1519
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use NexposeSimpleXML::Parser::ScanDetails; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my @generated : Field : Arg(generated) : All(generated); |
9
|
|
|
|
|
|
|
my @scandetails : Field : Arg(scandetails) : Get(scandetails) : |
10
|
|
|
|
|
|
|
Type(NexposeSimpleXML::Parser::ScanDetails); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
|
|
|
|
|
|
my ( $self, $parser, $doc ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
foreach my $nx ( $doc->getElementsByTagName('NeXposeSimpleXML') ) { |
16
|
|
|
|
|
|
|
my $generated |
17
|
|
|
|
|
|
|
= scalar( @{ $nx->getElementsByTagName('generated') } ) > 0 |
18
|
|
|
|
|
|
|
? @{ $nx->getElementsByTagName('generated') }[0] |
19
|
|
|
|
|
|
|
->textContent() |
20
|
|
|
|
|
|
|
: undef; |
21
|
|
|
|
|
|
|
return NexposeSimpleXML::Parser::Session->new( |
22
|
|
|
|
|
|
|
generated => $generated, |
23
|
|
|
|
|
|
|
scandetails => NexposeSimpleXML::Parser::ScanDetails->parse( |
24
|
|
|
|
|
|
|
$parser, $doc |
25
|
|
|
|
|
|
|
), |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
1; |