need help with XML::Simple

need help with XML::Simple

am 01.11.2010 18:01:15 von galeb abu-ali

--0050450160018e33f0049400c159
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I installed BioPerl on RHEL 5.5 (successfully I hope) and am trying to
execute a xml parser script that uses XML::Simple. I keep getting the
following error message:

could not find ParserDetails.ini in /usr/local/lib/perl5/site_
perl/5.12.2/XML/SAX

When I try to reinstall XML::Simple using CPAN, it tells me that the module
is up to date. Not sure what to do at this point. Does anyone have an idea
what I'm doing wrong or haven't done? My script is below.

many thanks

galeb

#!/usr/local/bin/perl
# parse_xml_OMap.pl
use strict; use warnings;
use Data::Dumper;


use XML::Simple;
my $xs = XML::Simple->new;
my $ref = $xs->XMLin(@ARGV);

#print Dumper($ref); use Data::Dumper;


my $ref2array = $ref->{'RESTRICTION_MAP'}->{'FRAGMENTS'}->{'F'};

print $ref2array, "\n";



foreach my $ref_2_frag_hash (@{$ref2array}){

#print Dumper $ref_2_frag_hash;
my $I = $ref_2_frag_hash->{'I'} +1;
my $S = $ref_2_frag_hash->{'S'};

#my $I = ${$ref_2_frag_hash}{'I'}+1;
#my $S = ${$ref_2_frag_hash}{'S'};

print "$I\t$S\n";
}

--0050450160018e33f0049400c159--

Re: need help with XML::Simple

am 01.11.2010 18:17:42 von Jim Gibson

On 11/1/10 Mon Nov 1, 2010 10:01 AM, "galeb abu-ali"
scribbled:

> Hi,
>
> I installed BioPerl on RHEL 5.5 (successfully I hope) and am trying to
> execute a xml parser script that uses XML::Simple. I keep getting the
> following error message:
>
> could not find ParserDetails.ini in /usr/local/lib/perl5/site_
> perl/5.12.2/XML/SAX
>
> When I try to reinstall XML::Simple using CPAN, it tells me that the module
> is up to date. Not sure what to do at this point. Does anyone have an idea
> what I'm doing wrong or haven't done? My script is below.

On my system, ParserDetails.ini is located in the directory:

/usr/local/lib/perl5/site_perl/5.10.1/XML/SAX

so it would seem to be part of the XML::SAX module.

Also, the documentation for XML::Simple contains this:

The XML::Simple module provides a simple API layer on top of an
underlying XML parsing module (either XML::Parser or one of the SAX2
parser modules).

So XML::Simple depends upon an XML parser installed independently on your
system. Have you installed any XML parsers?



--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: need help with XML::Simple

am 01.11.2010 18:45:22 von galeb abu-ali

--0050450160015a29ba0494015f2e
Content-Type: text/plain; charset=ISO-8859-1

I do not have ParserDetails.ini in the SAX folder. I just tried installing
XML::Parser using CPAN and got a lot of error messages that end with:

make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/root/.cpan/build/XML-Parser-
2.40-oAWQkX/Expat'
make: *** [subdirs] Error 2
CHORNY/XML-Parser-2.40.tar.gz
make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible

Before installing perl, I also installed the expat library expat-2.0.1.

galeb


On Mon, Nov 1, 2010 at 1:17 PM, Jim Gibson wrote:

> On 11/1/10 Mon Nov 1, 2010 10:01 AM, "galeb abu-ali" <
> abualiga2@gmail.com>
> scribbled:
>
> > Hi,
> >
> > I installed BioPerl on RHEL 5.5 (successfully I hope) and am trying to
> > execute a xml parser script that uses XML::Simple. I keep getting the
> > following error message:
> >
> > could not find ParserDetails.ini in /usr/local/lib/perl5/site_
> > perl/5.12.2/XML/SAX
> >
> > When I try to reinstall XML::Simple using CPAN, it tells me that the
> module
> > is up to date. Not sure what to do at this point. Does anyone have an
> idea
> > what I'm doing wrong or haven't done? My script is below.
>
> On my system, ParserDetails.ini is located in the directory:
>
> /usr/local/lib/perl5/site_perl/5.10.1/XML/SAX
>
> so it would seem to be part of the XML::SAX module.
>
> Also, the documentation for XML::Simple contains this:
>
> The XML::Simple module provides a simple API layer on top of an
> underlying XML parsing module (either XML::Parser or one of the SAX2
> parser modules).
>
> So XML::Simple depends upon an XML parser installed independently on your
> system. Have you installed any XML parsers?
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>

--0050450160015a29ba0494015f2e--

Re: need help with XML::Simple

am 01.11.2010 19:54:40 von galeb abu-ali

--0016363100f335a1df04940257be
Content-Type: text/plain; charset=ISO-8859-1

I'm running Red Hat Enterprise Linux 5.5, and don't know how to go through
the package manager to get this done. Also, is it possible that I didn't
place the expat library in the right place?

thanks

On Mon, Nov 1, 2010 at 2:38 PM, shawn wilson wrote:

> What distribution are you running? It might be easier to go through the
> package manager and let it deal with dependencies. Under ubuntu, its
> libxml-parser-perl.
> On Nov 1, 2010 1:47 PM, "galeb abu-ali" wrote:
> > I do not have ParserDetails.ini in the SAX folder. I just tried
> installing
> > XML::Parser using CPAN and got a lot of error messages that end with:
> >
> > make[1]: *** [Expat.o] Error 1
> > make[1]: Leaving directory `/root/.cpan/build/XML-Parser-
> > 2.40-oAWQkX/Expat'
> > make: *** [subdirs] Error 2
> > CHORNY/XML-Parser-2.40.tar.gz
> > make -- NOT OK
> > Running make test
> > Can't test without successful make
> > Running make install
> > Make had returned bad status, install seems impossible
> >
> > Before installing perl, I also installed the expat library expat-2.0.1.
> >
> > galeb
> >
> >
> > On Mon, Nov 1, 2010 at 1:17 PM, Jim Gibson wrote:
> >
> >> On 11/1/10 Mon Nov 1, 2010 10:01 AM, "galeb abu-ali" <
> >> abualiga2@gmail.com>
> >> scribbled:
> >>
> >> > Hi,
> >> >
> >> > I installed BioPerl on RHEL 5.5 (successfully I hope) and am trying to
> >> > execute a xml parser script that uses XML::Simple. I keep getting the
> >> > following error message:
> >> >
> >> > could not find ParserDetails.ini in /usr/local/lib/perl5/site_
> >> > perl/5.12.2/XML/SAX
> >> >
> >> > When I try to reinstall XML::Simple using CPAN, it tells me that the
> >> module
> >> > is up to date. Not sure what to do at this point. Does anyone have an
> >> idea
> >> > what I'm doing wrong or haven't done? My script is below.
> >>
> >> On my system, ParserDetails.ini is located in the directory:
> >>
> >> /usr/local/lib/perl5/site_perl/5.10.1/XML/SAX
> >>
> >> so it would seem to be part of the XML::SAX module.
> >>
> >> Also, the documentation for XML::Simple contains this:
> >>
> >> The XML::Simple module provides a simple API layer on top of an
> >> underlying XML parsing module (either XML::Parser or one of the SAX2
> >> parser modules).
> >>
> >> So XML::Simple depends upon an XML parser installed independently on
> your
> >> system. Have you installed any XML parsers?
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> >> For additional commands, e-mail: beginners-help@perl.org
> >> http://learn.perl.org/
> >>
> >>
> >>
>

--0016363100f335a1df04940257be--

Re: need help with XML::Simple

am 01.11.2010 22:03:35 von galeb abu-ali

--20cf300fad5f56d0170494042449
Content-Type: text/plain; charset=ISO-8859-1

i downloaded perl-XML-Parser using yum and am getting an error message:

Can't locate XML/LibXML/SAX.pm in @INC (@INC contains:
/usr/local/lib/perl5/site_perl/5.12.2/x86_64-linux-multi
/usr/local/lib/perl5/site_perl/5.12.2
/usr/local/lib/perl5/5.12.2/x86_64-linux-multi /usr/local/lib/perl5/5.12.2
..) at (eval 3) line 1.


On Mon, Nov 1, 2010 at 3:08 PM, shawn wilson wrote:

> It would seem that they call it perl-xml-parser. I don't know much redhat,
> but, yum install should work.
>
> That said, maybe it would be best to do it through cpan since you're not
> maintaining through yum.
> On Nov 1, 2010 2:56 PM, "galeb abu-ali" wrote:
> > I'm running Red Hat Enterprise Linux 5.5, and don't know how to go
> through
> > the package manager to get this done. Also, is it possible that I didn't
> > place the expat library in the right place?
> >
> > thanks
> >
> > On Mon, Nov 1, 2010 at 2:38 PM, shawn wilson wrote:
> >
> >> What distribution are you running? It might be easier to go through the
> >> package manager and let it deal with dependencies. Under ubuntu, its
> >> libxml-parser-perl.
> >> On Nov 1, 2010 1:47 PM, "galeb abu-ali" wrote:
> >> > I do not have ParserDetails.ini in the SAX folder. I just tried
> >> installing
> >> > XML::Parser using CPAN and got a lot of error messages that end with:
> >> >
> >> > make[1]: *** [Expat.o] Error 1
> >> > make[1]: Leaving directory `/root/.cpan/build/XML-Parser-
> >> > 2.40-oAWQkX/Expat'
> >> > make: *** [subdirs] Error 2
> >> > CHORNY/XML-Parser-2.40.tar.gz
> >> > make -- NOT OK
> >> > Running make test
> >> > Can't test without successful make
> >> > Running make install
> >> > Make had returned bad status, install seems impossible
> >> >
> >> > Before installing perl, I also installed the expat library
> expat-2.0.1.
> >> >
> >> > galeb
> >> >
> >> >
> >> > On Mon, Nov 1, 2010 at 1:17 PM, Jim Gibson
> wrote:
> >> >
> >> >> On 11/1/10 Mon Nov 1, 2010 10:01 AM, "galeb abu-ali" <
> >> >> abualiga2@gmail.com>
> >> >> scribbled:
> >> >>
> >> >> > Hi,
> >> >> >
> >> >> > I installed BioPerl on RHEL 5.5 (successfully I hope) and am trying
> to
> >> >> > execute a xml parser script that uses XML::Simple. I keep getting
> the
> >> >> > following error message:
> >> >> >
> >> >> > could not find ParserDetails.ini in /usr/local/lib/perl5/site_
> >> >> > perl/5.12.2/XML/SAX
> >> >> >
> >> >> > When I try to reinstall XML::Simple using CPAN, it tells me that
> the
> >> >> module
> >> >> > is up to date. Not sure what to do at this point. Does anyone have
> an
> >> >> idea
> >> >> > what I'm doing wrong or haven't done? My script is below.
> >> >>
> >> >> On my system, ParserDetails.ini is located in the directory:
> >> >>
> >> >> /usr/local/lib/perl5/site_perl/5.10.1/XML/SAX
> >> >>
> >> >> so it would seem to be part of the XML::SAX module.
> >> >>
> >> >> Also, the documentation for XML::Simple contains this:
> >> >>
> >> >> The XML::Simple module provides a simple API layer on top of an
> >> >> underlying XML parsing module (either XML::Parser or one of the SAX2
> >> >> parser modules).
> >> >>
> >> >> So XML::Simple depends upon an XML parser installed independently on
> >> your
> >> >> system. Have you installed any XML parsers?
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> >> >> For additional commands, e-mail: beginners-help@perl.org
> >> >> http://learn.perl.org/
> >> >>
> >> >>
> >> >>
> >>
>

--20cf300fad5f56d0170494042449--

Re: need help with XML::Simple

am 02.11.2010 02:20:34 von Shawn Wilson

--0016363b98aa4bb661049407bb41
Content-Type: text/plain; charset=ISO-8859-1

I'm just talking out of my ass here but, it sounds like either you need to
install the sax module or your search path is messed up. The former should
be easy enough to check, for the later try:
perldoc -v
And
perldoc -f perlrun
On Nov 1, 2010 5:04 PM, "galeb abu-ali" wrote:
> i downloaded perl-XML-Parser using yum and am getting an error message:
>
> Can't locate XML/LibXML/SAX.pm in @INC (@INC contains:
> /usr/local/lib/perl5/site_perl/5.12.2/x86_64-linux-multi
> /usr/local/lib/perl5/site_perl/5.12.2
> /usr/local/lib/perl5/5.12.2/x86_64-linux-multi /usr/local/lib/perl5/5.12.2
> .) at (eval 3) line 1.
>
>
> On Mon, Nov 1, 2010 at 3:08 PM, shawn wilson wrote:
>
>> It would seem that they call it perl-xml-parser. I don't know much
redhat,
>> but, yum install should work.
>>
>> That said, maybe it would be best to do it through cpan since you're not
>> maintaining through yum.
>> On Nov 1, 2010 2:56 PM, "galeb abu-ali" wrote:
>> > I'm running Red Hat Enterprise Linux 5.5, and don't know how to go
>> through
>> > the package manager to get this done. Also, is it possible that I
didn't
>> > place the expat library in the right place?
>> >
>> > thanks
>> >
>> > On Mon, Nov 1, 2010 at 2:38 PM, shawn wilson
wrote:
>> >
>> >> What distribution are you running? It might be easier to go through
the
>> >> package manager and let it deal with dependencies. Under ubuntu, its
>> >> libxml-parser-perl.
>> >> On Nov 1, 2010 1:47 PM, "galeb abu-ali" wrote:
>> >> > I do not have ParserDetails.ini in the SAX folder. I just tried
>> >> installing
>> >> > XML::Parser using CPAN and got a lot of error messages that end
with:
>> >> >
>> >> > make[1]: *** [Expat.o] Error 1
>> >> > make[1]: Leaving directory `/root/.cpan/build/XML-Parser-
>> >> > 2.40-oAWQkX/Expat'
>> >> > make: *** [subdirs] Error 2
>> >> > CHORNY/XML-Parser-2.40.tar.gz
>> >> > make -- NOT OK
>> >> > Running make test
>> >> > Can't test without successful make
>> >> > Running make install
>> >> > Make had returned bad status, install seems impossible
>> >> >
>> >> > Before installing perl, I also installed the expat library
>> expat-2.0.1.
>> >> >
>> >> > galeb
>> >> >
>> >> >
>> >> > On Mon, Nov 1, 2010 at 1:17 PM, Jim Gibson
>> wrote:
>> >> >
>> >> >> On 11/1/10 Mon Nov 1, 2010 10:01 AM, "galeb abu-ali" <
>> >> >> abualiga2@gmail.com>
>> >> >> scribbled:
>> >> >>
>> >> >> > Hi,
>> >> >> >
>> >> >> > I installed BioPerl on RHEL 5.5 (successfully I hope) and am
trying
>> to
>> >> >> > execute a xml parser script that uses XML::Simple. I keep getting
>> the
>> >> >> > following error message:
>> >> >> >
>> >> >> > could not find ParserDetails.ini in /usr/local/lib/perl5/site_
>> >> >> > perl/5.12.2/XML/SAX
>> >> >> >
>> >> >> > When I try to reinstall XML::Simple using CPAN, it tells me that
>> the
>> >> >> module
>> >> >> > is up to date. Not sure what to do at this point. Does anyone
have
>> an
>> >> >> idea
>> >> >> > what I'm doing wrong or haven't done? My script is below.
>> >> >>
>> >> >> On my system, ParserDetails.ini is located in the directory:
>> >> >>
>> >> >> /usr/local/lib/perl5/site_perl/5.10.1/XML/SAX
>> >> >>
>> >> >> so it would seem to be part of the XML::SAX module.
>> >> >>
>> >> >> Also, the documentation for XML::Simple contains this:
>> >> >>
>> >> >> The XML::Simple module provides a simple API layer on top of an
>> >> >> underlying XML parsing module (either XML::Parser or one of the
SAX2
>> >> >> parser modules).
>> >> >>
>> >> >> So XML::Simple depends upon an XML parser installed independently
on
>> >> your
>> >> >> system. Have you installed any XML parsers?
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
>> >> >> For additional commands, e-mail: beginners-help@perl.org
>> >> >> http://learn.perl.org/
>> >> >>
>> >> >>
>> >> >>
>> >>
>>

--0016363b98aa4bb661049407bb41--

Re: need help with XML::Simple

am 02.11.2010 18:53:22 von galeb abu-ali

--20cf300fb4f7d52b7b0494159964
Content-Type: text/plain; charset=ISO-8859-1

You're right, my path is messed up, I have SAX installed. I tried to move
stuff around and when I run the script I get a new error message:
Can't locate loadable object for module XML::LibXML in @INC (@INC contains:
/usr/local/lib/perl5/site_perl/5.12.2/x86_64-linux-multi
/usr/local/lib/perl5/site_perl/5.12.2
/usr/local/lib/perl5/5.12.2/x86_64-linux-multi /usr/local/lib/perl5/5.12.2
..) at /usr/local/lib/perl5/5.12.2/x86_64-linux-multi/DynaLoader.pm line 153
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.12.2/XML/LibXML.pm line 153.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.12.2/XML/LibXML/SAX.pm line 17.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.12.2/XML/LibXML/SAX.pm line 17.
Compilation failed in require at (eval 3) line 1.

Please advise, feel like breaking stuff.

On Mon, Nov 1, 2010 at 9:20 PM, shawn wilson wrote:

> I'm just talking out of my ass here but, it sounds like either you need to
> install the sax module or your search path is messed up. The former should
> be easy enough to check, for the later try:
> perldoc -v
> And
> perldoc -f perlrun
> On Nov 1, 2010 5:04 PM, "galeb abu-ali" wrote:
> > i downloaded perl-XML-Parser using yum and am getting an error message:
> >
> > Can't locate XML/LibXML/SAX.pm in @INC (@INC contains:
> > /usr/local/lib/perl5/site_perl/5.12.2/x86_64-linux-multi
> > /usr/local/lib/perl5/site_perl/5.12.2
> > /usr/local/lib/perl5/5.12.2/x86_64-linux-multi
> /usr/local/lib/perl5/5.12.2
> > .) at (eval 3) line 1.
> >
> >
> > On Mon, Nov 1, 2010 at 3:08 PM, shawn wilson wrote:
> >
> >> It would seem that they call it perl-xml-parser. I don't know much
> redhat,
> >> but, yum install should work.
> >>
> >> That said, maybe it would be best to do it through cpan since you're not
> >> maintaining through yum.
> >> On Nov 1, 2010 2:56 PM, "galeb abu-ali" wrote:
> >> > I'm running Red Hat Enterprise Linux 5.5, and don't know how to go
> >> through
> >> > the package manager to get this done. Also, is it possible that I
> didn't
> >> > place the expat library in the right place?
> >> >
> >> > thanks
> >> >
> >> > On Mon, Nov 1, 2010 at 2:38 PM, shawn wilson
> wrote:
> >> >
> >> >> What distribution are you running? It might be easier to go through
> the
> >> >> package manager and let it deal with dependencies. Under ubuntu, its
> >> >> libxml-parser-perl.
> >> >> On Nov 1, 2010 1:47 PM, "galeb abu-ali" wrote:
> >> >> > I do not have ParserDetails.ini in the SAX folder. I just tried
> >> >> installing
> >> >> > XML::Parser using CPAN and got a lot of error messages that end
> with:
> >> >> >
> >> >> > make[1]: *** [Expat.o] Error 1
> >> >> > make[1]: Leaving directory `/root/.cpan/build/XML-Parser-
> >> >> > 2.40-oAWQkX/Expat'
> >> >> > make: *** [subdirs] Error 2
> >> >> > CHORNY/XML-Parser-2.40.tar.gz
> >> >> > make -- NOT OK
> >> >> > Running make test
> >> >> > Can't test without successful make
> >> >> > Running make install
> >> >> > Make had returned bad status, install seems impossible
> >> >> >
> >> >> > Before installing perl, I also installed the expat library
> >> expat-2.0.1.
> >> >> >
> >> >> > galeb
> >> >> >
> >> >> >
> >> >> > On Mon, Nov 1, 2010 at 1:17 PM, Jim Gibson
> >> wrote:
> >> >> >
> >> >> >> On 11/1/10 Mon Nov 1, 2010 10:01 AM, "galeb abu-ali" <
> >> >> >> abualiga2@gmail.com>
> >> >> >> scribbled:
> >> >> >>
> >> >> >> > Hi,
> >> >> >> >
> >> >> >> > I installed BioPerl on RHEL 5.5 (successfully I hope) and am
> trying
> >> to
> >> >> >> > execute a xml parser script that uses XML::Simple. I keep
> getting
> >> the
> >> >> >> > following error message:
> >> >> >> >
> >> >> >> > could not find ParserDetails.ini in /usr/local/lib/perl5/site_
> >> >> >> > perl/5.12.2/XML/SAX
> >> >> >> >
> >> >> >> > When I try to reinstall XML::Simple using CPAN, it tells me that
> >> the
> >> >> >> module
> >> >> >> > is up to date. Not sure what to do at this point. Does anyone
> have
> >> an
> >> >> >> idea
> >> >> >> > what I'm doing wrong or haven't done? My script is below.
> >> >> >>
> >> >> >> On my system, ParserDetails.ini is located in the directory:
> >> >> >>
> >> >> >> /usr/local/lib/perl5/site_perl/5.10.1/XML/SAX
> >> >> >>
> >> >> >> so it would seem to be part of the XML::SAX module.
> >> >> >>
> >> >> >> Also, the documentation for XML::Simple contains this:
> >> >> >>
> >> >> >> The XML::Simple module provides a simple API layer on top of an
> >> >> >> underlying XML parsing module (either XML::Parser or one of the
> SAX2
> >> >> >> parser modules).
> >> >> >>
> >> >> >> So XML::Simple depends upon an XML parser installed independently
> on
> >> >> your
> >> >> >> system. Have you installed any XML parsers?
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> >> >> >> For additional commands, e-mail: beginners-help@perl.org
> >> >> >> http://learn.perl.org/
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >>
>

--20cf300fb4f7d52b7b0494159964--