xml parsing

M

Madhu Ramachandran

hello,

iam new to perl and want to use an xml parser bundled with perl . i have
version v5.6.1 and when i run a perl script, it doesnt seem to recognize the
expat based perl parser.

znc0s0jh:/> perl xmlp2.pl
Can't locate XML/Parser.pm in @INC (@INC contains: /opt/servman/bin
/opt/sspfs/fs /opt/ser
vman/bin/Algorithm-Dependency/lib /opt/servman/bin /opt/sspfs/fs
/opt/servman/bin/Algorith
m-Dependency/lib /usr/perl5/5.6.1/lib/sun4-solaris-64int
/usr/perl5/5.6.1/lib /usr/perl5/s
ite_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl /usr/per
l5/vendor_perl/5.6.1/sun4-solaris-64int /usr/perl5/vendor_perl/5.6.1
/usr/perl5/vendor_per
l .) at xmlp2.pl line 3.

my line 3: use XML::parser;

Appreciate any help. I want to only use xml parser which comes bundled with
perl. reason is: i want to provide a script on a load(which has perl), but
can't request adding any external modules to the load.

Thanks.

Madhu
 
M

Matt Garrish

Madhu Ramachandran said:
hello,

iam new to perl and want to use an xml parser bundled with perl . i have
version v5.6.1 and when i run a perl script, it doesnt seem to recognize
the expat based perl parser.

znc0s0jh:/> perl xmlp2.pl
Can't locate XML/Parser.pm in @INC (@INC contains: /opt/servman/bin

It appears that XML-Parser does not come bundled with your Perl, or you have
the wrong path to the Perl lib you're using in @INC. (It's not a core
module, so why do you think it's bundled?).

You either need to find where the module has been installed and add the path
or install the module (I suspect the latter).

Matt
 
J

J. Gleixner

Madhu said:
hello,

iam new to perl and want to use an xml parser bundled with perl . i have
version v5.6.1 and when i run a perl script, it doesnt seem to recognize the
expat based perl parser.

znc0s0jh:/> perl xmlp2.pl
Can't locate XML/Parser.pm in @INC (@INC contains: /opt/servman/bin
/opt/sspfs/fs /opt/ser
vman/bin/Algorithm-Dependency/lib /opt/servman/bin /opt/sspfs/fs
/opt/servman/bin/Algorith
m-Dependency/lib /usr/perl5/5.6.1/lib/sun4-solaris-64int
/usr/perl5/5.6.1/lib /usr/perl5/s
ite_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl /usr/per
l5/vendor_perl/5.6.1/sun4-solaris-64int /usr/perl5/vendor_perl/5.6.1
/usr/perl5/vendor_per
l .) at xmlp2.pl line 3.

my line 3: use XML::parser;

Appreciate any help. I want to only use xml parser which comes bundled with
perl. reason is: i want to provide a script on a load(which has perl), but
can't request adding any external modules to the load.

Thanks.

Madhu

Well, it's either not installed (very likely) or installed in a
directory outside of your @INC (not very likely). To resolve it you'll
either need to install it, or find where it's currently installed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top