XML::Bits - a tree of XML nodes
use XML::Bits; my $div = XML::Bits->new(div =>); $div->create_child(div =>)->create_child(div =>); print $div, "\n";
my $node = XML::Bits->new($tag => [%attributes], @children);
Adds a child, regardless of the child's previous parenthood.
$node->add_child($child);
NOTE: there's some questionable issues about the tree parentage and rerooting here. Beware of bugs if you move elements around between trees. ALSO NOTE: this API might change such that it is required to use a different method for this sort of thing.
Returns true if this is a text node.
$node->is_text;
Stringification (and operator overloading support.)
my $string = $node->stringify;
A shortcut tag constructor.
T{tag => [%atts], @content};
Eric Wilhelm @ <ewilhelm at cpan dot org>
http://scratchcomputing.com/
If you found this module on CPAN, please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
If you pulled this development version from my /svn/, please contact me directly.
Copyright (C) 2009 Eric L. Wilhelm, All Rights Reserved.
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install XML::Bits, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Bits
CPAN shell
perl -MCPAN -e shell install XML::Bits
For more information on module installation, please visit the detailed CPAN module installation guide.