Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: XML::Parser Tutorial

by Anonymous Monk
on Sep 20, 2001 at 22:51 UTC ( #113668=note: print w/ replies, xml ) Need Help??


in reply to XML::Parser Tutorial

When we use Xml::parser for parsing how to check the well formedness of the xml tag ,ie to check all the tags are closed and given tags are in pairs like that .......Is there is any method for that?Please let me know. Thanxz, Prabu


Comment on Re: XML::Parser Tutorial
Re: Re: XML::Parser Tutorial
by ajt (Prior) on Sep 30, 2001 at 21:13 UTC
    There is a rule regarding XML (you may hate it), if the XML is not well-formed (all the tags matching up and correctly nested), then the parser should stop fatally.

    So if you try and parse a file that isn't well-formed XML you will discover this very quickly as the parser will die. (This is incientally a quick way of figuring out if a file is XML.)

    Davorg gives a good example here: Re: Is a file XML?. Basically you eval the parse call to trap the die, then do what you want afterwards.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-08-23 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls