Woulfe has asked for the wisdom of the Perl Monks concerning the following question:
... will fail given certain characters in the XML document. This is not a problem. The problem is that when it fails it will continue to print out the same error message again and again until the process is stopped. Here is a sample XMl file that will fail:use XML::Simple; my $p= XML::Simple->new(); my $doc= $p->XMLin(shift);
The error message is:http://www.blahfoo.com/stuff/podtech.rss
and that line of code is the read() function. I'm certain that (after reading as much of the utf8/unicode documentation that I can stomach) the error message was due to a bad mapping into Unicode. However, I can't figure what is causing it to simply do this over and over. I just need to get around it. I read about this same issue (with a different hex code for the offending "character") somewhere else. No one seemed to have anything to offer other than preprocess the file. This is not really an option. Ideas?uft8 "\xE2" does not map to Unicode at /usr/lib/perl5/site_perl/5.8.6/ +XML/SAX/PurePerl/Reader/Stream.ps line 37
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Infinite loop in XML Parser?
by Joost (Canon) on Feb 15, 2007 at 20:26 UTC | |
by Woulfe (Initiate) on Feb 15, 2007 at 20:44 UTC | |
by Anonymous Monk on Feb 15, 2007 at 21:23 UTC | |
|
Re: Infinite loop in XML Parser?
by Anonymous Monk on Feb 15, 2007 at 21:31 UTC | |
by Woulfe (Initiate) on Feb 16, 2007 at 03:08 UTC |