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
Solved

XML::Simple not finding parse method

Posted on 2006-11-21
14
966 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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

839 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