.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::SAX::ExpatXS 3pm" .TH XML::SAX::ExpatXS 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME XML::SAX::ExpatXS \- Perl SAX 2 XS extension to Expat parser .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use XML::SAX::ExpatXS; \& \& $handler = MyHandler\->new(); \& $parser = XML::SAX::ExpatXS\->new( Handler => $handler ); \& $parser\->parse_uri($uri); \& #or \& $parser\->parse_string($xml); .Ve .SH DESCRIPTION .IX Header "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 as bugs. .SS Features .IX Subsection "Features" The parser behavior can be changed by setting features. .PP .Vb 1 \& $parser\->set_feature(FEATURE, VALUE); .Ve .PP XML::SAX::ExpatXS provides these adjustable features: .ie n .IP """http://xmlns.perl.org/sax/join\-character\-data""" 4 .el .IP \f(CWhttp://xmlns.perl.org/sax/join\-character\-data\fR 4 .IX Item "http://xmlns.perl.org/sax/join-character-data" Consequent character data are joined (1, default) or not (0). .ie n .IP """http://xmlns.perl.org/sax/ns\-attributes""" 4 .el .IP \f(CWhttp://xmlns.perl.org/sax/ns\-attributes\fR 4 .IX Item "http://xmlns.perl.org/sax/ns-attributes" Namespace attributes are reported as common attributes (1, default) or not (0). .ie n .IP """http://xmlns.perl.org/sax/xmlns\-uris""" 4 .el .IP \f(CWhttp://xmlns.perl.org/sax/xmlns\-uris\fR 4 .IX Item "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 \f(CW\*(C`http://www.w3.org/2000/xmlns/\*(C'\fR namespace. This feature is set to 1 by default. .ie n .IP """http://xml.org/sax/features/xmlns\-uris""" 4 .el .IP \f(CWhttp://xml.org/sax/features/xmlns\-uris\fR 4 .IX Item "http://xml.org/sax/features/xmlns-uris" This feature applies if and only if the \f(CW\*(C`http://xmlns.perl.org/sax/xmlns\-uris\*(C'\fR feature is off. Then, xmlns and xmlns:* attributes are both put into no namespace (0, default) or into \f(CW\*(C`http://www.w3.org/2000/xmlns/\*(C'\fR namespace (1). .ie n .IP """http://xmlns.perl.org/sax/locator""" 4 .el .IP \f(CWhttp://xmlns.perl.org/sax/locator\fR 4 .IX Item "http://xmlns.perl.org/sax/locator" The document locator is updated (1, default) for ContentHadler events or not (0). .ie n .IP """http://xmlns.perl.org/sax/recstring""" 4 .el .IP \f(CWhttp://xmlns.perl.org/sax/recstring\fR 4 .IX Item "http://xmlns.perl.org/sax/recstring" A recognized string (the text string currently processed by this XML parser) is either maintained as \f(CW$parser\fR\->{ParseOptions}{RecognizedString} (1) or not (0, default). .ie n .IP """http://xml.org/sax/features/external\-general\-entities""" 4 .el .IP \f(CWhttp://xml.org/sax/features/external\-general\-entities\fR 4 .IX Item "http://xml.org/sax/features/external-general-entities" Controls whether this parser processes external general entities (1, default) or not (0). .ie n .IP """http://xml.org/sax/features/external\-parameter\-entities""" 4 .el .IP \f(CWhttp://xml.org/sax/features/external\-parameter\-entities\fR 4 .IX Item "http://xml.org/sax/features/external-parameter-entities" Controls whether this parser processes external parameter entities including an external DTD subset (1) or not (0, default). .SS "Constructor Options" .IX Subsection "Constructor Options" Apart from features, the behavior of this parser can also be changed with options to the constructor. .IP ParseParamEnt 4 .IX Item "ParseParamEnt" .Vb 1 \& ParseParamEnt => 1 .Ve .Sp This option meaning is exactly the same as the \f(CW\*(C`http://xml.org/sax/features/external\-parameter\-entities\*(C'\fR feature. The option is supported only because of the compatibility with older versions of this module. Turned off by default. .IP NoExpand 4 .IX Item "NoExpand" .Vb 1 \& NoExpand => 1 .Ve .Sp No internal entities are expanded if this option is turned on. Turned off by default. .SS "Read-only Properties" .IX Subsection "Read-only Properties" .IP ExpatVersion 4 .IX Item "ExpatVersion" This property returns a version of linked Expat library, for example expat_1.95.7. .SH AUTHORS .IX Header "AUTHORS" .Vb 2 \& Petr Cimprich (maintainer) \& Matt Sergeant .Ve .SH COPYRIGHT .IX Header "COPYRIGHT" 2002\-2004 Matt Sergeant, 2004\-2011 Petr Cimprich. All rights reserved. .SH LICENSE .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.