in reply to Re: Different Web Shops Need Different Tools
in thread HTATR II: HTML table generation via DWIM tree rewriting

i wonder if you could utilize XML::Twig instead of rolling your own "rewiter"?
Twig is another one of those things I stared at and played with for awhile. I never quite understood his approach to grokking XML.

TreeBuilder does parsing of rogue HTML quite well and the TreeBuilder API has most everything that I want for /(?i:ht|x)ml/

DBSchema::Sample