Name : perl-YAX
| |
Version : 0.03
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 7.11
| Date : 2017-08-04 14:47:00
|
Group : Development/Libraries/Perl
| Source RPM : perl-YAX-0.03-7.11.src.rpm
|
Size : 0.07 MB
| |
Packager : (none)
| |
Summary : Yet Another XML library
|
Description :
YAX is a fast pure Perl XML library for easily parsing, constructing, querying and manipulating XML. Simple benchmarks have shown that it is substantially faster than the XML::DOM::Parser manpage which uses Expat internally (which is written in C), see the /PERFORMANCE manpage for an explanation and related caveats.
However, the main point of YAX is to remove the verbosity of the DOM API by using more perlish tricks such as operator overloading. For example, element nodes can behave as both array references and hash references. If dereferenced as an array reference, then a list of children is returned; as a hash reference, the attributes hash is returned. So the following show uses cases for this:
my AATTgood_books = grep { $_->{author} =~ /\\bAsimov\\b/ } AATT$elmt;
You can also hang out of band data onto your elements:
$elmt->{notes} = IO::File->new( \'./notes/asimov.txt\' );
without affecting serialization since attributes who\'s values are references are ignored during stringification.
YAX nodes, of course, also provide methods for appending, replacing and removing children as well (note the following all operate on the children of \'$node\'):
$node->replace( $new_child, $ref_child ); $node->remove( $child ); $node->append( $child ); $node->insert( $new_child, $ref_child );
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-Y/openSUSE_Tumbleweed/noarch |