Jabber::NodeFactory 0.03 review
DownloadJabber::NodeFactory is a simple XML Node Factory for Jabber. SYNOPSIS my $nf = new Jabber::NodeFactory(fromstr => 1); prin
|
|
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