Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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?
[holli]: Oh, seems like LanX' team has won the fourth World Cup ... awesome!
LanX grins
[marto]: anyway, don't come to Glasgow for the football :)
[holli]: the hell? i have a scriptblocker on.
[holli]: how do you update a different window without javascript?
[holli]: ah, chatterbox right
[marto]: it's a normal HTML form, with some hidden input fields
[holli]: forgot that thing exists for a moment.
LanX welcome to the twilight zone ...
[Eily]: LanX well since the onion is your eye you should see it everywhere

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2017-12-14 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (398 votes). Check out past polls.

    Notices?