Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

libxml2 anyone? 2

Status
Not open for further replies.

strantheman

Programmer
Mar 12, 2001
333
0
0
US
I was directed to use a perl module called libxml2

Can anyone direct me to where I can find a PPD for this? It sounds like a fantastic extension of the existing XML::LibXML So maybe I just need that library, but I can't seem to find that either.

I attempted:
ppm install XML-LibXML

but it did not find it.

thanks for any help here, really would like to mess with XPATH

 
The latest versions of libxml2 can be found on the xmlsoft.org server ( HTTP, FTP and rsync are available), there is also mirrors (Australia( Web), France) or on the Gnome FTP server as source archive , Antonin Sprinzl also provide a mirror in Austria. (NOTE that you need both the libxml(2) and libxml(2)-devel packages installed to compile applications using libxml.)
 
I need a link man. The xmlsoft.org web site is terrible.

Thanks for any help you can provide here.

nic
 
Be warned you need to ensure you get the correct libraries and Perl distributions that are compatible. I had a terrible time getting them work when they upgraded their compiler about a year ago.

XML::LibXML has already been upgraded to use the latest xmllib2 libraries. You can get a Windows port from here[link]. You may also want to consider getting the latest libraries for iconv & libxslt.

Barbie
Leader of Birmingham Perl Mongers
[URL unfurl="true"]http://birmingham.pm.org
 
Hi Pengo and Barbell. Thanks for the help.

After the 3 rep commands, my search for libxml did come up differently:
ppm> search libxml
Searching in Active Repositories
1. libxml-perl [0.08] Perl SAX parser using nsgmls
2. libxml-perl [0.07] Perl SAX parser using nsgmls
3. libxml-perl [0.08] Perl SAX parser using nsgmls
4. libxml-perl [0.07] A collection of Perl modules for working wit~
5. libxml-perl [0.07] Collection of Perl modules for working with ~
6. XML-LibXML [1.58] Interface to Gnome libxml2 xml parsing and D~
7. XML-LibXML [1.58] Interface to Gnome libxml2 xml parsing and D~
8. XML-LibXML-Common [0.13] Routines and Constants common for XML::LibXM~
9. XML-LibXML-Common [0.13] Routines and Constants common for XML::LibXM~
10. XML-LibXML-Iterator [1.00] XML::LibXML's Tree Iteration Class
11. XML-LibXML-Iterator [1.00] XML::LibXML's Tree Iteration Class
12. XML-LibXML-XPathCon~ [0.04] Perl interface to libxml2's xmlXPathContext
13. XML-LibXML-XPathCon~ [0.06] Perl interface to libxml2's xmlXPathContext

but when I attempted:

install XML-LibXML

I got:
Error: no suitable installation target found for package XML-LibXML

My current ActivePerl install directory is E:\perl and I do have a E:\Perl\site\lib\XML so if it was looking to install there it should have found a suitable folder.

thanks for your assistance again, after all this im definitely compiling my own PPD mirror web site.

nic
 
What version of Perl are you running? It sounds like the version you have isn't compatible with the PPD files that your copy of PPM has found. It might be worth adding a few extra repositories. For this try the following scripts I usually use.

The first (ppm-install1.pl) installs the PPM::Repositories module. You should also be able to do this via PPM itself (or cpan or cpanp).

Code:
#!/usr/bin/perl -w
use strict;

use PPM

PPM::InstallPackage("package" => 'PPM-Repositories');

The second script (ppm-install2.pl) reads through the current list of known PPM repositories, and adds those that are active and removes that are no longer used. I tend to use this whenever the PPM::Repositories module gets updated.

Code:
#!/usr/bin/perl -w
use strict;

use PPM;
use PPM::Repositories;

my @list = PPM::ListOfRepositories();
my %list = map {$_ => 1} @list;

for my $rep ( keys %Repositories ) {
	if($list{$rep}) {
		if(!$Repositories{$rep}->{Active}) {
			PPM::RemoveRepository(	"repository" => $rep, 
									"save" => 1);
		}
	} else {
		if($Repositories{$rep}->{Active}) {
			PPM::AddRepository(		"repository" => $rep, 
									"location" => $Repositories{$rep}->{location}, 
									"save" => 1);
		}
	}
}

Now try and install XML-LibXML. You might have better luck. Failing that you can always use the automated installers, either cpan or cpanp (see faq219-1687 for more details).

Or if the worst comes to the worst, you can always download the tarball from CPAN and try and install it yourself, via the manual method:

Code:
c:> perl Makefile.PL
c:> nmake
c:> nmake test
c:> nmake install

See the FAQ metioned above for more details.

Barbie
Leader of Birmingham Perl Mongers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top