I agree. I think most projects that start off with homebrewed regex XML parsers tend to work fine at first. When the project starts to mature, you end up writing more conditionals into your parser. Over time you will find that you have just written something that is not-so-pretty, not-so-flexible, and not-so-supportable as
. for most projects it makes sense to bail out early and use one of the XML parser/manipulators on cpan. Even when I have a very strong feeling my projects will not creap in terms of what I do with XML, I tend to use a cpan module for the manip and parse.