Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

XML::XPath::PerlSAX

Name XML::XPath::PerlSAX
Version 1.42
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/XML/XPath/PerlSAX.pm
Is Core No
Search CPAN for this module XML::XPath::PerlSAX
Documentation XML::XPath::PerlSAX
Module Details XML::XPath::PerlSAX

NAME

XML::XPath::PerlSAX - A PerlSAX event generator for my weird node structure


SYNOPSIS

        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
        }


DESCRIPTION

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.


LICENSE AND COPYRIGHT

This module is copyright 2000 AxKit.com Ltd. This is free software, and as such comes with NO WARRANTY. No dates are used in this module. You may distribute this module under the terms of either the Gnu GPL, or the Artistic License (the same terms as Perl itself).

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024