in reply to Re^2: XML::Twig generating invalid XHTML output??
in thread XML::Twig generating invalid XHTML output??
Could it be that you're suppose to use twig_handlers instead of twig_roots, since you don't want body to become a root node? The example from the module's documentation is: (irrelevant details omitted)
my $twig=XML::Twig->new( twig_handlers => { title => sub { $_->set_gi('h2') }, # Change title tags to h2. para => sub { $_->set_gi('p') }, # Change para to p. hidden => sub { $_->delete; }, # Remove hidden elements. list => \&my_list_process, # Process list elements. }, pretty_print => 'indented', # Output will be nicely formatted. );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: XML::Twig generating invalid XHTML output??
by nick (Sexton) on Feb 14, 2005 at 17:59 UTC | |
by ikegami (Patriarch) on Feb 14, 2005 at 18:05 UTC |
In Section
Seekers of Perl Wisdom