Hammy has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I have a block of code that crashes when running through XMLin(). If I remove the encoding piece from the top XML tag, it works fine. I can not find anything on the net that indicates this will fail. Does anyone have a clue as to why this would hang?
<?xml version="1.0" encoding="ISO-8859-1"?> <mytag> <mytag.ack errors="0" responses="1"> <mytag.response>User data updated for ID: 545454545</mytag.respons +e> </mytag.ack> </mytag>
<?xml version="1.0"?> <mytag> <mytag.ack errors="0" responses="1"> <mytag.response>User data updated for ID: 545454545</mytag.respons +e> </mytag.ack> </mytag>
The blocks above are stored in a variable called $result that gets returned from a 3rd party's soap service.
my $xs = new XML::Simple(keeproot => 1); my $XMLref = $xs->XMLin($result, suppressempty => '');
Thanks in advance for whatever guidance you can offer. - Mark

Replies are listed 'Best First'.
Re: XMLin() hangs with encoding="ISO-8859-1"
by Joost (Canon) on Sep 14, 2006 at 19:17 UTC
      That is why it confused me so much because it is supposed to work, it just doesn't. It could be the fact I have an older version of perl (5.6.1). My test box, 5.8.5 works as well. I was afraid it was a version think, but I don't have to like it. Thanks.