in reply to Re: XML::Simple cannot parse Simple XML file
in thread XML::Simple cannot parse Simple XML file

if somebody knows how to make XML::Simple more lenient it would help me a lot

No it wouldn't. You do not understand what you are asking for. As soon as you tried parsing with a different parser, you would be back to square one. Do you really want to take on the world, one XML parser at a time?

XML is really quite a simple format. It's also very flexible. It's also designed to be used in all sorts of environments and contexts. To make sure it achieves this goal, you have to play by the rules. And these are that you can't just make stuff up and expect it to work.

In theory, the idea behind XML was that writing a parser should be easy. It didn't quite pan out as well as everyone expected, but part of this quest for simplicity meant that the parser didn't have to attempt to deal with documents that try to bend the rules. So no-one is going to add extra stuff to their parser to deal with bogus documents, since the standard already states that they do not have to.

XML, while it is simple, is also a royal pain to work with. It's bad enough as it is. If it turned out that we had several classes of parsers, some of which were able to parse document X and not document Y, some could parse both and some could parse neither, the situation would become well nigh impossible. Does "Well it looks ok with my parser!" sound familiar?

• another intruder with the mooring in the heart of the Perl

  • Comment on Re^2: XML::Simple cannot parse Simple XML file