Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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 cooling their heels in the Monastery: (5)
As of 2016-02-14 09:24 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (469 votes), past polls