NAME
Tree::Template::Declare::LibXML
SYNOPSIS
SPECIFICITIES
A function xmlns
is exported, so that you can declare XML namespaces:
xmlns test => 'http://test/';
node { name 'test:elem'; attribs id => 1, 'test:attr' => 5 };
You can create nodes with qualified names with undeclared prefixes, but it's probably not a good idea.
To add text nodes, you could do something like:
my $el=node { name 'elem_with_text' };
$el->appendTextNode('some text content');
This is ugly, so you can do:
node {
name 'elem_with_text';
text_node 'some text content';
};
AUTHOR
Gianni Ceccarelli <dakkar@thenautilus.net>