Gianni Ceccarelli > Tree-Template-Declare-0.4 > Tree::Template::Declare::LibXML

Download:
Tree-Template-Declare-0.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.4   Source   Latest Release: Tree-Template-Declare-0.5

NAME ^

Tree::Template::Declare::LibXML

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>

syntax highlighting: