in reply to Efficiently inserting XML data

I'm about to repeat a statement that a lot of people around here have heard time and time again: Don't use regular expressions for parsing HTML or XML. They might work in a few simple cases, but you must use a real parser for anything in the least bit complex.

There are many other modules besides XML::Parser to do the job. I've never used any of them, but I'm sure there will be suggestions below for just about all of them :)

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated