New version of Perl XPath processor
21:41, 7 Aug 2000 UTC | Edd Dumbill

Matt Sergeant has announced version 0.56 of XML::XPath, his Perl module for locating nodes in an XML document using XPath.

This latest version is available for download from Sergeant's web site, and is expected to be on CPAN in a few days. Sergeant writes of the new release:

This release fixes the preceding/following sibling bugs, and fixes the ID stuff to work properly by reading the DTD. It also doesn't encode higher order utf8 characters as numeric entities unless you set the variable $XML::XPath::EncodeUtf8AsEntity to a true value.

The XML::XPath module can be fed with SAX events, or parse an XML file directly. This usage example is contained in the module's documentation:

        use XML::XPath;
        use XML::XPath::XMLParser;
        my $xp = XML::XPath->new(filename => 'test.xhtml');
        my $nodeset = $xp->find('/html/body/p'); # find all paragraphs
        foreach my $node ($nodeset->get_nodelist) {
                print "FOUND\n\n", 

xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories