Data::Stag 0.10 review
Download
|
|
Data::Stag is a Perl module with structured tags datastructures.
SYNOPSIS
# PROCEDURAL USAGE
use Data::Stag qw(:all);
$doc = stag_parse($file);
@persons = stag_find($doc, "person");
foreach $p (@persons) {
printf "%s, %s phone: %sn",
stag_sget($p, "family_name"),
stag_sget($p, "given_name"),
stag_sget($p, "phone_no"),
;
}
# OBJECT-ORIENTED USAGE
use Data::Stag;
$doc = Data::Stag->parse($file);
@persons = $doc->find("person");
foreach $p (@person) {
printf "%s, %s phone:%sn",
$p->sget("family_name"),
$p->sget("given_name"),
$p->sget("phone_no"),
;
}
This module is for manipulating data as hierarchical tag/value pairs (Structured TAGs or Simple Tree AGgreggates).
Requirements:
Perl
Data::Stag 0.10 keywords