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

Hi All, I have to validate a very large xml file. Is there any possible way to locate all the errors in a single shot?

  • Comment on Validating an xml file and logging the errors

Replies are listed 'Best First'.
Re: Validating an xml file and logging the errors
by CountZero (Bishop) on Dec 30, 2011 at 14:02 UTC
    Yes: XML::LibXML

    Of course, once an XML document contains an error, it is anybody's guess if the parser will be able to make any sense of what follows.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James