Now, what am I trying to do. I have an XML document that I have to parse. I can parse everything, except for multiple drivers and vehicles. Everything I run this I only get one driver when I have two drivers. The beginning tag is <driver id=> (what I'm searching off of). The same with vehicles.
I knew nothing about XML till the last day (now I know next to nothing). Then I had to parse some XML and I had heard about XML::Simple judging that if it were really simple, then it would have been the right tool for me. Indeed, it turned out to be. It just slurped the XML (file or string) into a handy, familiar Perl data structure. For multiple tags I get an arrayref, and that's it. So all in all if you don't need the full, lower lever, parsing power of XML::Parser, you may try it as well. OTOH the code you posted at first sight seems to verbose for me to want to delve into it in enough detail (not to mention the fact that at first sight I see many things I don't like), and although somebody will probably be less lazy than I am, I bet many will be scared about it too, so I recommend preparing a minimal example exhibiting the problem yourself.
In reply to Re: While in XML document
by blazar
in thread While in XML document
by curtisb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |