Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: XML::Simple giving a non-specific error

by FloydATC (Chaplain)
on Mar 12, 2010 at 13:34 UTC ( #828289=note: print w/ replies, xml ) Need Help??


in reply to XML::Simple giving a non-specific error

I'd say that the reason why the parser does not complain about line 8 is that it has no valid reason to say an ERROR element cannot contain another ERROR element.

In order for the parser to know this you would have to use a DTD to describe the valid document tree.

Consider this syntactically valid set of tags:

<ERROR> <FOO> </FOO> <ERROR> <BAR> </BAR> </ERROR> </ERROR>
Now, if you remove the last line, the XML becomes invalid. It would be tempting to fix the problem in line 4 but this would give a completely different document structure.

-- Time flies when you don't know what you're doing


Comment on Re: XML::Simple giving a non-specific error
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-07-02 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls