[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Modules] XML::Parser crasher



Something goes seriously wrong when I try to parse this simple XML:

<?xml version="1.0" encoding="UTF-8"?>
<Class>
<Interfaces-Implemented-or-Adopted-Protocols-Container>
<Interface-or-Protocol-Group-Container>

<Head-Interface-or-Protocol-Group>EOPropertyListEncoding</Head-Interface-or-Protocol-Group>

</Interface-or-Protocol-Group-Container>
</Interfaces-Implemented-or-Adopted-Protocols-Container>
</Class>

The code (excerpt) that I'm using to invoke XML:Parser is:

         my $parser = new XML::Parser();
         eval {$parser->parsefile($TheCrasherFile)};
         if ($@) {
             print "\a\a$File::Find::name not well-formed:\n$@\n";
             return;
         }

WARNING:  The sample XML above reliably crashes my 3400C or my G3, both
running MacOS 8.6.  Save all your work before testing!

I'm not sure of a good way to isolate the problem, but (after many
reboots), I've learned that if I rename the
Head-Interface-or-Protocol-Group tag, the problem goes away. (However,
I'm not in control of the tag names, so renaming isn't an option.)
Also, if another element is injected inside the
Head-Interface-or-Protocol-Group element, the parser doesn't crash.

Many of these tags are long and have hyphens, so I wonder if that could
be a problem (although I believe they are valid XML tag names).

Any ideas?

Thanks,
Matt


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org