Jabber::NodeFactory 0.03 review

Download
by rbytes.net on

Jabber::NodeFactory is a simple XML Node Factory for Jabber. SYNOPSIS my $nf = new Jabber::NodeFactory(fromstr => 1); prin

License: Perl Artistic License
File size: 11K
Developer: DJ Adams
0 stars award from rbytes.net

Jabber::NodeFactory is a simple XML Node Factory for Jabber.

SYNOPSIS

my $nf = new Jabber::NodeFactory(fromstr => 1);
print $nf->newNode('presence')->toStr;

->

my $tag1 = $nf->newNode('iq');
$tag1->attr('type', 'get');
my $query = $tag1->insertTag('query', 'jabber:iq:auth');
$query->insertTag('username')->data('qmacro');
print $tag1->toStr;

->
qmacro

my $tag2 = $nf->newNodeFromStr("hi");
$tag2->attr('to','qmacro@jabber.org');
my $msg = $tag2->getTag('body')->data;
print $tag2->toStr, "n";
print $msg;

-> hi
-> hi

Jabber::NodeFactory is a library for creating and manipulating XML nodes. It was created to offer similar functions to the xmlnode library in the Jabber server implementation.
It provides enough functions to create and manipulate XML fragments (nodes) in the Jabber XML stream world. The functions are low level, RISC-style.

Requirements:
Perl

Jabber::NodeFactory 0.03 keywords