Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: How can i validate xml file?

by davorg (Chancellor)
on Feb 23, 2006 at 16:00 UTC ( #532301=note: print w/replies, xml ) Need Help??

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.


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://532301]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2019-08-20 01:28 GMT
Find Nodes?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?

    Results (142 votes). Check out past polls.