XML::Records 0.12 review

Download
by rbytes.net on

XML::Records is a Perl module for perlish record-oriented interface to XML. SYNOPSIS use XML::Records; my $p=XML::Records-

License: Perl Artistic License
File size: 7K
Developer: Eric Bohlman
0 stars award from rbytes.net

XML::Records is a Perl module for perlish record-oriented interface to XML.

SYNOPSIS

use XML::Records;
my $p=XML::Records->new('data.lst');
$p->set_records('credit','debit');
my ($t,$r)
while ( (($t,$r)=$p->get_record()) && $t) {
my $amt=$r->{Amount};
if ($t eq 'debit') {
...
}
}

XML::Records provides a single interface for processing XML data on a stream-oriented, tree-oriented, or record-oriented basis. A subclass of XML::TokeParser, it adds methods to read "records" and tree fragments from XML documents.

In many documents, the immediate children of the root element form a sequence of identically-named and independent elements such as log entries, transactions, etc., each of which consists of "field" child elements or attributes. You can access each such "record" as a simple Perl hash.

You can also read any element and its children into a lightweight tree implemented as a Perl hash, or feed the contents of any element and its children into a SAX handler (making it possible to process "records" with modules like XML::DOM or XML::XPath).

Requirements:
Perl

XML::Records 0.12 search tags