Re: could not find ParserDetails.ini

Grant McLean <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
On Thu, 2010-06-03 at 17:31 -0500, Peng Yu wrote: 
> Hi,
> 
> I know this question has been addressed at. But I'm not sure if they
> apply to my cases or not.
> 
> http://perl-xml.sourceforge.net/faq/#parserdetails.ini
> 
> Basically, I downloaded the perl source code (perl-5.10.1.tar.bz2),
> compiled it and installed it in my home directory (ubuntu linux). I
> don't remember I've ever downloaded XML package than install it
> separately. So I assume that the XML come with perl source code
> package. (Correct me if I'm not correct.)

The ParserDetail.ini message comes from XML::SAX.  This isn't part of
the Perl distribution so either you have install XML::SAX since you
built Perl or you have another installation of XML::SAX (maybe
under /usr/lib or /usr/local/lib). 

> Would you please let me know how to fix the problem?

You need to find where XML::SAX is installed, for example on my system I
located it with this one-liner:

  $ perl -MXML::SAX -le 'print $INC{"XML/SAX.pm"}'
  /usr/share/perl5/XML/SAX.pm

Then you need to create a file using the same path but take off '.pm'
and add '/ParserDetails.ini'.  In my case it would be:

  /usr/share/perl5/XML/SAX/ParserDetails.ini

Put these two lines in the file:

[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1

Then your error should go away.

But if you're going to use XML::SAX then you probably ought to install
XML::SAX::Expat or XML::SAX::ExpatXS.

Cheers
Grant



_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.