Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

XMLin() hangs with encoding="ISO-8859-1"

by Hammy (Scribe)
on Sep 14, 2006 at 19:08 UTC ( #572981=perlquestion: print w/replies, xml ) Need Help??
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://572981]
Approved by Joost
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2018-07-22 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (453 votes). Check out past polls.

    Notices?