Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
XML /
Grove /
[ HOME SHELL ]
Name
Size
Permission
Action
AsCanonXML.pm
3.68
KB
-rw-r--r--
AsString.pm
4.86
KB
-rw-r--r--
Builder.pm
6.51
KB
-rw-r--r--
Factory.pm
8.04
KB
-rw-r--r--
IDs.pm
2.3
KB
-rw-r--r--
Path.pm
3.15
KB
-rw-r--r--
PerlSAX.pm
6.66
KB
-rw-r--r--
Sub.pm
2.77
KB
-rw-r--r--
Subst.pm
5.11
KB
-rw-r--r--
XPointer.pm
2.21
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : IDs.pm
# # Copyright (C) 1998, 1999 Ken MacLeod # XML::Grove::IDs is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # $Id: IDs.pm,v 1.2 1999/08/17 15:01:28 kmacleod Exp $ # use strict; package XML::Grove::IDs; use Data::Grove::Visitor; sub new { my ($type, $name, $elements) = @_; $name = 'id' if(!defined $name); return (bless {Name => $name, Elements => $elements}, $type); } sub visit_document { my $self = shift; my $grove = shift; my $hash = shift; $grove->children_accept ($self, $hash); } sub visit_element { my $self = shift; my $element = shift; my $hash = shift; if(!$self->{Elements} or $self->{Elements}{$element->{Name}}) { my $id = $element->{Attributes}{$self->{Name}}; $hash->{$id} = $element if (defined $id); } $element->children_accept ($self, $hash); } ### ### Extend the XML::Grove::Document and XML::Grove::Element packages with our ### new function. ### package XML::Grove::Document; sub get_ids { my $self = shift; my $hash = {}; $self->accept(XML::Grove::IDs->new(@_), $hash); return $hash; } package XML::Grove::Element; sub get_ids { my $self = shift; my $hash = {}; $self->accept(XML::Grove::IDs->new(@_), $hash); return $hash; } 1; __END__ =head1 NAME XML::Grove::IDs - return an index of `id' attributes in a grove =head1 SYNOPSIS use XML::Grove::IDs; # Using get_ids method on XML::Grove::Document or XML::Grove::Element: $hash = $grove_object->get_ids($attr_name, $elements); # Using an XML::Grove::IDs instance: $indexer = XML::Grove::IDs->new($attr_name, $elements); my $hash = {}; $grove_object->accept($indexer, $hash); =head1 DESCRIPTION C<XML::Grove::IDs> returns a hash index of all nodes in a grove with an `id' attribute. The keys of the hash are the ID attribute value and the value at that key is the element. `C<$attr_name>' and `C<$elements>' are optional. The attribute name defaults to `C<id>' if `C<$attr_name>' is not supplied. Indexing can be restricted to only certain elements, by name, by providing a hash containing NAME=>1 values. =head1 AUTHOR Ken MacLeod, ken@bitsko.slc.ut.us =head1 SEE ALSO perl(1), XML::Grove(3), Data::Grove::Visitor(3) Extensible Markup Language (XML) <http://www.w3c.org/XML> =cut
Close