in reply to Strip that XML!
I'd look to something like XML::Parser with a quickness. No sense in reinventing the wheel.
Originally posted as a Categorized Answer.