Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml::libxml::attributehash(3pm) [debian man page]

XML::LibXML::AttributeHash(3pm) 			User Contributed Perl Documentation			   XML::LibXML::AttributeHash(3pm)

NAME
XML::LibXML::AttributeHash - tie an XML::LibXML::Element to a hash to access its attributes SYNOPSIS
tie my %hash, 'XML::LibXML::AttributeHash', $element; $hash{'href'} = 'http://example.com/'; print $element->getAttribute('href') . " "; DESCRIPTION
This class allows an element's attributes to be accessed as if they were a plain old Perl hash. Attribute names become hash keys. Namespaced attributes are keyed using Clark notation. my $XLINK = 'http://www.w3.org/1999/xlink'; tie my %hash, 'XML::LibXML::AttributeHash', $element; $hash{"{$XLINK}href"} = 'http://localhost/'; print $element->getAttributeNS($XLINK, 'href') . " "; There is rarely any need to use XML::LibXML::AttributeHash directly. In general, it is possible to take advantage of XML::LibXML::Element's overloading. The example in the SYNOPSIS could have been written: $element->{'href'} = 'http://example.com/'; print $element->getAttribute('href') . " "; The tie interface allows the passing of additional arguments to XML::LibXML::AttributeHash: tie my %hash, 'XML::LibXML::AttributeHash', $element, %args; Currently only one argument is supported, the boolean "weaken" which (if true) indicates that the tied object's reference to the element should be a weak reference. This is used by XML::LibXML::Element's overloading. The "weaken" argument is ignored if you don't have a working Scalar::Util::weaken. perl v5.14.2 2012-06-20 XML::LibXML::AttributeHash(3pm)

Check Out this Related Man Page

Net::EPP::Frame::Command::Login(3pm)			User Contributed Perl Documentation		      Net::EPP::Frame::Command::Login(3pm)

NAME
Net::EPP::Frame::Command::Login - an instance of Net::EPP::Frame::Command for the EPP "<login>" command. OBJECT HIERARCHY
L<XML::LibXML::Node> +----L<XML::LibXML::Document> +----L<Net::EPP::Frame> +----L<Net::EPP::Frame::Command> +----L<Net::EPP::Frame::Command::Login> METHODS
my $node = $frame->clID; This method returns the XML::LibXML::Element object corresponding to the "<clID>" element. my $node = $frame->pw; This method returns the XML::LibXML::Element object corresponding to the "<pw>" element. my $node = $frame->newPW; This method returns the XML::LibXML::Element object corresponding to the "<newPW>" element. my $node = $frame->svcs; This method returns the XML::LibXML::Element object corresponding to the "<svcs>" element. my $node = $frame->options; This method returns the XML::LibXML::Element object corresponding to the "<options>" element. my $node = $frame->version; This method returns the XML::LibXML::Element object corresponding to the "<version>" element. my $node = $frame->lang; This method returns the XML::LibXML::Element object corresponding to the "<lang>" element. AUTHOR
CentralNic Ltd (http://www.centralnic.com/). COPYRIGHT
This module is (c) 2012 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o Net::EPP::Frame perl v5.14.2 2012-04-23 Net::EPP::Frame::Command::Login(3pm)
Man Page