Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Is a file XML?

by davorg (Chancellor)
on Sep 25, 2001 at 15:23 UTC ( #114507=note: print w/ replies, xml ) Need Help??

in reply to Is a file XML?

That's pretty much how I'd do it. Using code like this:

use XML::Parser; my $p = XML::Parser->new; my $file = 'whatever.xml'; eval { $p->parsefile($file) }; if ($@) { # XML is not well formed } else { # XML is well formed }

"The first rule of Perl club is you don't talk about Perl club."

Comment on Re: Is a file XML?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-11-27 06:36 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (719 votes), past polls