Kim Ryan
asked on
XML::Simple not finding parse method
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_fi le_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(0x82 6ea44)] at /usr/local/lib/perl5/site_ perl/5.8.8 /XML/SAX/B ase.pm line 2616.
The default parser, XML::SAX::Expat is installed and tested ok.
use XML::Simple;
my $xml_parser = new XML::Simple;
$out = $xml_parser->XMLin($xml_fi
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(0x82
The default parser, XML::SAX::Expat is installed and tested ok.
update your XML::Simple module and see if that helps. Also read the documentation of the newest version of XML::Simple
ASKER
Am running latest version of XML::Simple. Read through doco.
See comment #2 here: http://aspn.activestate.com/ASPN/Mail/Message/perl-xml/2579066
ASKER
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)
(using Linux RH9)
ASKER
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.
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.
> .. did not have the right permsissions, ..
which permissions does it have? what are the permissions of the directory?
which permissions does it have? what are the permissions of the directory?
ASKER
it was rwxr----- I think
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
otherwise you need to chmod 444 Expat.so
ASKER
I found the problem myself, was just a local permision problem. Can I get a points refund?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.