Solved

XML::Simple not finding parse method

Posted on 2006-11-21
14
961 Views
Last Modified: 2011-10-03
Just upgraded to Perl 5.8.8. XML::SImple used to parse my file of XML data with no problem. Now get this error,

use XML::Simple;
my $xml_parser = new XML::Simple;
 $out = $xml_parser->XMLin($xml_file_name);

No _parse_* routine defined on this driver (If it is a filter, remember to set the Parent property. If you call the parse() method, make sure to set a Source. You may want to call parse_uri, parse_string or parse_file instead.) [XML::SAX::Expat=HASH(0x826ea44)] at /usr/local/lib/perl5/site_perl/5.8.8/XML/SAX/Base.pm line 2616.

The default parser, XML::SAX::Expat is installed and tested ok.
0
Comment
Question by:Kim Ryan
14 Comments
 
LVL 8

Expert Comment

by:Perl_Diver
ID: 17994240
update your XML::Simple module and see if that helps. Also read the documentation of the newest version of XML::Simple
0
 
LVL 19

Author Comment

by:Kim Ryan
ID: 17994498
Am running latest version of XML::Simple. Read through doco.
0
 
LVL 17

Expert Comment

by:mjcoyne
ID: 17995614
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 19

Author Comment

by:Kim Ryan
ID: 18001122
Thanks mjcoyne, have read the comment. I am not calling parse_file directly, this is done internally bey XML::Simple.. My problem is that XML::Simple used to work fine, but now wont parse anything since I upgraded perl. Have sifted thru module source code, but completely stumped on this one.

(using Linux RH9)
0
 
LVL 19

Author Comment

by:Kim Ryan
ID: 18005219
OK, found the error. The shared object Expat.so did not have the right permsissions, along with it's paretn diredtories.

This has caused me other problems. I upgraded my CPAN module and installed several modules with it but the directory permissions are wrong, no read access for 'other'. I used a umask of 002 but  still a problem.

Am happy to raise this as a new question with 500 points if anyone has an idea of what is causing the problem.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18008483
> .. did not have the right permsissions, ..
which permissions does it have? what are the permissions of the directory?
0
 
LVL 19

Author Comment

by:Kim Ryan
ID: 18015413
it was rwxr----- I think
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18034853
and is your user, which started the perl script, the same as the owner of the lib (as your permissions request)?
otherwise you need to chmod 444 Expat.so
0
 
LVL 19

Author Comment

by:Kim Ryan
ID: 18451137
I found the problem myself, was just a local permision problem. Can I get a points refund?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 18451475
> .. was just a local permision problem.
that's what I said.
0
 
LVL 19

Author Comment

by:Kim Ryan
ID: 18595028
It was a local permision problem, as I found for myself. Not the type of problem someone could have picked up without access to my system. Thnaks for all the advice, but I think this is one I solved myself. Would prefer a points refund.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question