in reply to Re: Forcing XML to validate
in thread Forcing XML to validate

There's no need to modify expat to stop your program dying on the first error it encounters - that's what eval is for. This is covered in the Perl-XML FAQ.

Also, the '<?xml ...' declaration at the top of an XML file is optional and frequently omitted. Don't rely on it being there.