in reply to Re^2: Getting start and end xml tags
in thread Getting start and end xml tags

When I inevitably hit the omg I gotta parse some XML* stage, I found it easier to understand an event-based parser, but you may not. It was a long time ago, but I think the module I found easiest to work with and understand was XML::Simple (oh but don't use that either!) (SAX (wikipedia) based parsing), which is event-based (found a start tag!, etc), but I can't really remember since it's been a very long time (circa 2004**); I think the book I bought at the time was, Perl and XML.

* I am a Perl programming, Jeb! Not a Java monkey!

** Yes, everyone hits this stage as they're trucking along. It's a good sign. But please listen to those wiser than you (not me, I mean the others telling you to not parse XML with regexes)

Replies are listed 'Best First'.
Re^4: Getting start and end xml tags
by haukex (Archbishop) on May 28, 2020 at 13:42 UTC
      I delinked XML::Simple (OH but don't use it!) it, but I can't change the fact that I used it in 2004. Sorry, chef.

        Thanks for the edit. I rememberd another reason why XML::Simple would not work in this particular case: it can't handle mixed content at all.