ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
XML::Simple, how to catch error: not well-formed?
by Kelvin Wu other posts by this author
Dec 28 2004 2:51AM messages near this date
view in the new Beta List Site
Re: XSLT question : excluding attributes | Re: XML::Simple, how to catch error: not well-formed?
& XSLT Hi list,

Is it possible to catch XML error when parsing XML files using XML::Smple?

my $xml = XMLin($file);
next if $xml-> error();

something like that.

I want to catch any error if the XML file is not a valid XML file,
rather than stop my script at :

not well-formed (invalid token) at line 1, column 269, byte 269 at
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/XML/Parser.pm
line 185
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Kelvin Wu
Grant McLean

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved