Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I have a problem getting XML::Parser to read a file of mine. I've stripped it down to a ridiculously bare-bones case:
use XML::Parser; sub handler_start() { print $_[1], "\n"; } my $parser = new XML::Parser(); $parser->setHandlers( Start => \&handler_start ); $parser->parsefile('test.xml');
And this is the content of the test.xml file:
<article id="1"> <tester>TEST</tester> </article>
Now, I can get XML::Parser to work on other snippets, but not this one. Is that XML malformed in some way I didn't realize? I am working on Windows (XP) and I get the error box "Perl Command Line Interpreter has encountered a problem and needs to close."
Can anybody see the problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Parser Weirdness
by DigitalKitty (Parson) on Jul 08, 2003 at 20:04 UTC | |
by Anonymous Monk on Jul 08, 2003 at 20:53 UTC | |
|
Re: XML::Parser Weirdness
by gjb (Vicar) on Jul 08, 2003 at 19:09 UTC | |
|
Re: XML::Parser Weirdness
by bigj (Monk) on Jul 08, 2003 at 23:14 UTC | |
by Anonymous Monk on Jul 09, 2003 at 17:51 UTC | |
by grantm (Parson) on Jul 10, 2003 at 10:23 UTC | |
by Anonymous Monk on Jul 10, 2003 at 18:32 UTC |