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

I have some large (3-5Mb) XML files that won't parse with XML::Simple. Is there a parser that might tell me what the issue(s) are?

Replies are listed 'Best First'.
Re: XML parsing errors - finding them
by jczeus (Monk) on Jul 24, 2007 at 14:59 UTC
    If you're on Linux, you could use the xmllint command:
    $ xmllint --noout --valid foo.xml
    Or you could use XML::LibXML:
    my $parser = XML::LibXML->new; $parser->validation(1); eval { $parser->parse_file('foo.xml'); }; print $@ if $@;
Re: XML parsing errors - finding them
by rpanman (Scribe) on Jul 24, 2007 at 14:39 UTC
    It might be worth trying out the XML::Parser module and parsing your content with the ErrorContext option set. That should give you some idea.
Re: XML parsing errors - finding them
by Anonymous Monk on Jul 24, 2007 at 14:49 UTC
    XML-Twig can parse XML one node at at time - when selecting "roots" option. You could try to catch the problem node that way.