?
Solved

XML::Simple not finding parse method

Posted on 2006-11-21
14
Medium Priority
?
986 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Six Sigma Control Plans
Suggested Courses

752 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