NAME

Tree::Template::Declare::LibXML - adaptor for LibXML

VERSION

version 0.7

SYNOPSIS

See Tree::Template::Declare.

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>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Gianni Ceccarelli <dakkar@thenautilus.net>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.