ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙpackage XML::XPath::Node::Attribute; use strict; use warnings; use vars qw/@ISA $VERSION/; @ISA = ('XML::XPath::Node'); $VERSION = '1.42'; package XML::XPath::Node::AttributeImpl; use vars qw/@ISA $VERSION/; @ISA = ('XML::XPath::NodeImpl', 'XML::XPath::Node::Attribute'); use XML::XPath::Node ':node_keys'; $VERSION = '1.42'; sub new { my $class = shift; my ($key, $val, $prefix) = @_; my $pos = XML::XPath::Node->nextPos; my @vals; @vals[node_global_pos, node_prefix, node_key, node_value] = ($pos, $prefix, $key, $val); my $self = \@vals; bless $self, $class; } sub getNodeType { ATTRIBUTE_NODE } sub isAttributeNode { 1; } sub getName { my $self = shift; $self->[node_key]; } sub getLocalName { my $self = shift; my $local = $self->[node_key]; $local =~ s/.*://; return $local; } sub getNodeValue { my $self = shift; $self->[node_value]; } sub getData { shift->getNodeValue(@_); } sub setNodeValue { my $self = shift; $self->[node_value] = shift; } sub getPrefix { my $self = shift; $self->[node_prefix]; } sub string_value { my $self = shift; return $self->[node_value]; } sub toString { my $self = shift; my $string = ' '; # if ($self->[node_prefix]) { # $string .= $self->[node_prefix] . ':'; # } $string .= join('', $self->[node_key], '="', XML::XPath::Node::XMLescape($self->[node_value], '"&><'), '"'); return $string; } sub getNamespace { my $self = shift; my ($prefix) = @_; $prefix ||= $self->getPrefix; if (my $parent = $self->getParentNode) { return $parent->getNamespace($prefix); } } 1; __END__ =head1 NAME Attribute - a single attribute =head1 API =head2 new ( key, value, prefix ) Create a new attribute node. =head2 getName Returns the key for the attribute =head2 getLocalName As getName above, but without namespace information =head2 getNodeValue / getData Returns the value =head2 setNodeValue Sets the value of the attribute node. =head2 getPrefix Returns the prefix =head2 getNamespace Return the namespace. =head2 toString Generates key="value", encoded correctly. =cut