Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Validating XML

by grantm (Parson)
on Dec 04, 2011 at 23:25 UTC ( #941775=note: print w/replies, xml ) Need Help??


in reply to Validating XML

I use the following Perl 1-liner to help identify the offending part of a broken XML file:

perl -MXML::Parser -e "XML::Parser->new( ErrorContext => 3 )->parsefil +e(shift)" filename.xml

The diagnostic output from XML::Parser includes an ASCII arrow pointing to the bad bit. Of course if the line in question is over 1300 bytes long then that might be a little hard to read :-(

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://941775]
help
Chatterbox?
[Discipulus]: it's friday all over the globe!
[choroba]: yay!
[Corion]: Ooh, yes, yay ;-D
[Discipulus]: my backpack is ready for two nights in the mountains!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2017-02-24 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (353 votes). Check out past polls.