Solved

XML::Simple not finding parse method

Posted on 2006-11-21
14
967 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
Industry Leaders: 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 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
perl script 4 115
perl CPAN issue 3 121
Need Helping Editing Perl Script for PowerChute Network Shutdown 3 92
add a syntax to a csv file 8 99
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…

726 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