XML::LibXML::NodeList::Iterator - Iteration Class for XML::LibXML XPath results
use XML::LibXML; use XML::LibXML::NodeList::Iterator;
my $doc = XML::LibXML->new->parse_string( $somedata ); my $nodelist = $doc->findnodes( $somexpathquery );
my $iter= XML::LibXML::NodeList::Iterator->new( $nodelist );
# more control on the flow
while ( $iter->next ) {
# do something
}
# operate on the entire tree $iter->iterate( \&operate );
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |