If your input data is not well-formed XML (and I assume that's what you're asking about) then the parse_file call will die. Put a eval around that call and check the value in $@ after parse_file returns.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re^3: How can i validate xml file?
by davorg
in thread How can i validate xml file?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |