http://www.perlmonks.org?node_id=532301


in reply to How can i validate xml file?

All XML processors will throw an exception (i.e. die) if they come across malformed XML (they have to, it's in the spec). So the way to check for valid XML is to try to parse the file and catch any exceptions thrown (using eval). This works with any of the Perl XML processing modules.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg