|
NAMETree::Simple::Visitor::FindByPath - A Visitor for finding an element in a Tree::Simple hierarchy with a pathSYNOPSISuse Tree::Simple::Visitor::FindByPath; # create a visitor object my $visitor = Tree::Simple::Visitor::FindByPath->new(); # set the search path for our tree $visitor->setSearchPath(qw(1 1.2 1.2.2)); # pass the visitor to a tree $tree->accept($visitor); # fetch the result, which will # be the Tree::Simple object that # we have found, or undefined my $result = $visitor->getResult() || die "No Tree found"; # our result's node value should match # the last element in our path print $result->getNodeValue(); # this should print 1.2.2 DESCRIPTIONGiven a path and Tree::Simple hierarchy, this Visitor will attempt to find the node specified by the path.METHODS
Repository<https://github.com/ronsavage/Tree-Simple-VisitorFactory>SUPPORTBugs should be reported via the CPAN bug tracker at<https://github.com/ronsavage/Tree-Simple-VisitorFactory/issues> CODE COVERAGESee the CODE COVERAGE section in Tree::Simple::VisitorFactory for more information.SEE ALSOThese Visitor classes are all subclasses of Tree::Simple::Visitor, which can be found in the Tree::Simple module, you should refer to that module for more information.AUTHORstevan little, <stevan@iinteractive.com>COPYRIGHT AND LICENSECopyright 2004, 2005 by Infinity Interactive, Inc.<http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |