The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XML::SAX::ExpatXS - Perl SAX 2 XS extension to Expat parser

SYNOPSIS

 use XML::SAX::ExpatXS;

 $handler = MyHandler->new();
 $parser = XML::SAX::ExpatXS->new( Handler => $handler );
 $parser->parse_uri($uri);
  #or
 $parser->parse_string($xml);

DESCRIPTION

XML::SAX::ExpatXS is a direct XS extension to Expat XML parser. It implements Perl SAX 2.1 interface. See http://perl-xml.sourceforge.net/perl-sax/ for Perl SAX API description. Any deviations from the Perl SAX 2.1 specification are considered to be bugs.

Features

The parser behavior can be changed by setting features.

 $parser->set_feature(FEATURE, VALUE);

XML::SAX::ExpatXS provides these adjustable features:

http://xmlns.perl.org/sax/join-character-data

Consequent character data are joined (1, default) or not (0).

http://xmlns.perl.org/sax/ns-attributes

Namespace attributes are reported as common attributes (1, default) or not (0).

http://xmlns.perl.org/sax/xmlns-uris

When set on, xmlns and xmlns:* attributes are put into namespaces in a Perl SAX traditional way; xmlns attributes are in no namespace while xmlns:* attributes are in the http://www.w3.org/2000/xmlns/ namespace. This feature is set to 1 by default.

http://xml.org/sax/features/xmlns-uris

This feature applies if and only if the http://xmlns.perl.org/sax/xmlns-uris feture is off. Then, xmlns and xmlns:* attributes are both put into no namespace (0, default) or into http://www.w3.org/2000/xmlns/ namespace (1).

http://xmlns.perl.org/sax/locator

Document locator is updated (1, default) for ContentHadler events or not (0).

AUTHORS

 Matt Sergeant <matt AT sergeant DOT org>
 Petr Cimprich <petr AT gingerall DOT org> (maintainer)