Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: XML::Parser XML validation

by CountZero (Bishop)
on Jan 05, 2013 at 13:47 UTC ( #1011787=note: print w/ replies, xml ) Need Help??


in reply to Re^2: XML::Parser XML validation
in thread XML::Parser XML validation

Yes. All bets are off for an XML document with errors. The first error found may actually not be the first error in the document: it is just the place where the parser got stuck.

Consider the following:

<a> <d> <e> </e> </b> </a>
Where is the error? Should <d> be <b> or should </b> be </d>? Or perhaps they should both be <f> ... </f> tags? How is the parser to know? To be sure the XML is not only well formed but also correct, you will have to validate the XML according to a DTD or Schema definition.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re^3: XML::Parser XML validation
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2014-09-19 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (140 votes), past polls