Originally posted by: Nitish Mishra
Hi !
I don't see that Perl::XML::SAX module is providing XML/SAX/ParserDetails.ini file in this version. It was available in earlier version (5.20) though. I will dig more on this.
However, this is how one can create the ParserDetails.ini file:
Run the following command/script:
1. /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser('XML::SAX::PurePerl')->save_parsers()"
The above command will show a message reading "could not find ParserDetails.ini in /usr/opt/perl5/lib/site_perl/5.28.1/XML/SAX" , but that is because it was not able to find ParserDetails.ini file as it is not
present. But from here onwards the file ParserDeatils.ini is created at location: /usr/opt/perl5/lib/site_perl/5.28.1/XML/SAX/ParserDetails.ini, and it would be having a content like this:
[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1
Now we need to add two more entries as it was in the earlier version. To add these entries run two more command scripts as below:
2. /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser('XML::LibXML::SAX::Parser')->save_parsers()"
3. /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser('XML::LibXML::SAX')->save_parsers()"
Finally the content of the file /usr/opt/perl5/lib/site_perl/5.28.1/XML/SAX/ParserDetails.ini, will be like this:
[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1
[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1
[XML::LibXML::SAX]
http://xml.org/sax/features/namespaces = 1