XML::XPath::PerlSAX(3pm)

XML::XPath::PerlSAX3pm

A perlsax event generator for my weird node structure

Usage

        use XML::XPath;
        use XML::XPath::PerlSAX;
        use XML::DOM::PerlSAX;
        my $xp = XML::XPath->new(filename => 'test.xhtml');
        my $paras = $xp->find('/html/body/p');
        my $handler = XML::DOM::PerlSAX->new();
        my $generator = XML::XPath::PerlSAX->new( Handler => $handler );
        foreach my $node ($paras->get_nodelist) {
                my $domtree = $generator->parse($node);
                # do something with $domtree
        }

Overview

This module generates PerlSAX events to pass to a PerlSAX handler such as XML::DOM::PerlSAX. It operates specifically on my weird tree format.

Unfortunately SAX doesn't seem to cope with namespaces, so these are lost completely. I believe SAX2 is doing namespaces.

Other

The XML::DOM::PerlSAX handler I tried was completely broken (didn't even compile before I patched it a bit), so I don't know how correct this is or how far it will work.

Releases

13 releases since Debian 3.0 (Woody); the text changed 6 times.

  1. 3.0
  2. 3.1–5.0
  3. 6.0–8
  4. 9
  5. 10–11
  6. 12–13
  7. Arch

From perl-xml-xpath 1.49-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.