/usr/share/perl5/XML/XPath/Node/PI.pm is in libxml-xpath-perl 1.42-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | package XML::XPath::Node::PI;
$VERSION = '1.42';
use strict; use warnings;
use vars qw/@ISA/;
@ISA = ('XML::XPath::Node');
package XML::XPath::Node::PIImpl;
use vars qw/@ISA/;
@ISA = ('XML::XPath::NodeImpl', 'XML::XPath::Node::PI');
use XML::XPath::Node ':node_keys';
sub new {
my $class = shift;
my ($target, $data) = @_;
my $pos = XML::XPath::Node->nextPos;
my @vals;
@vals[node_global_pos, node_target, node_data] =
($pos, $target, $data);
my $self = \@vals;
bless $self, $class;
}
sub getNodeType { PROCESSING_INSTRUCTION_NODE }
sub isPINode { 1; }
sub isProcessingInstructionNode { 1; }
sub getTarget {
my $self = shift;
$self->[node_target];
}
sub getData {
my $self = shift;
$self->[node_data];
}
sub _to_sax {
my $self = shift;
my ($doch, $dtdh, $enth) = @_;
# PI's not supported in PerlSAX 1
}
sub string_value {
my $self = shift;
return $self->[node_data];
}
sub toString {
my $self = shift;
return "<?" . $self->[node_target] . " " . XML::XPath::Node::XMLescape($self->[node_data], ">") . "?>";
}
1;
__END__
=head1 NAME
PI - an XML processing instruction node
=head1 API
=head2 new ( target, data )
Create a new PI node.
=head2 getTarget
Returns the target
=head2 getData
Returns the data
=cut
|