'Is there a small Perl XML parser that can replace CGI.pm's HTML generation functions?

Is there any little (1-2 .pm's) parser based around XML::* and suitable for replacing CGI.pm's constructions like:

foreach($xmlnodes) {
    print table( TR( td( $_) ) ); }

with node2html($node,$rules)?

I ain't going to fire up XSLT.



Solution 1:[1]

Whenever you want to find modules, search CPAN. Have a look around, and see what you like. The more you do it, the better sense of the landscape you'll have. Soon, you won't even have to ask. :)

I'm not sure what you are asking about, though, because you say "parser" but it seems that you want to go the other way. If you want to rewrite XML, I might recommend XML::Twig.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 brian d foy