XML::SAX::ExpatXS(3)
π NAME π
XML::SAX::ExpatXS β Perl SAX 2 XS extension to Expat parser. This is the XML::SAX::ExpatXS(3) page from the User Contributed Perl Documentation, and yes bestie, you're in the right place. Main character energy for XML parsing, fr fr. π
β¨ 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 πΈ
Okay so XML::SAX::ExpatXS is a direct XS extension to Expat XML parser. It implements the Perl SAX 2.1 interface. For the Perl SAX API description, see http://perl-xml.sourceforge.net/perl-sax/. Any deviations from the Perl SAX 2.1 specification are considered as bugs β no cap, that's literally the rule. π«Ά
π Features π
The parser behavior can be changed by setting features, like this:
$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,xmlnsandxmlns:*attributes are put into namespaces in a Perl SAX traditional way;xmlnsattributes are in no namespace whilexmlns:*attributes are in thehttp://www.w3.org/2000/xmlns/namespace. This feature is set to1by default. πhttp://xml.org/sax/features/xmlns-urisβ this feature applies if and only if thehttp://xmlns.perl.org/sax/xmlns-urisfeature is off. Then,xmlnsandxmlns:*attributes are both put into no namespace (0, default) or intohttp://www.w3.org/2000/xmlns/namespace (1). πhttp://xmlns.perl.org/sax/locatorβ the document locator is updated (1, default) for ContentHadler events or not (0). πhttp://xmlns.perl.org/sax/recstringβ a recognized string (the text string currently processed by this XML parser) is either maintained as$parser->{ParseOptions}{RecognizedString}(1) or not (0, default). π₯http://xml.org/sax/features/external-general-entitiesβ controls whether this parser processes external general entities (1, default) or not (0). π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). π
π§Έ Constructor Options π§Έ
Apart from features, the behavior of this parser can also be changed with options to the constructor. Bestie, these are the old-school knobs:
ParseParamEnt
ParseParamEnt => 1
The meaning of this option is exactly the same as the http://xml.org/sax/features/external-parameter-entities feature. The option is supported only because of compatibility with older versions of this module. Turned off by default. π
NoExpand
NoExpand => 1
No internal entities are expanded if this option is turned on. Turned off by default. π
π Read-only Properties π
ExpatVersion
This property returns a version of linked Expat library, for example expat_1.95.7. Iconic. β
π AUTHORS π
Petr Cimprich <pcimprich AT gmail DOT com> (maintainer)Matt Sergeant <matt AT sergeant DOT org>
π¦ COPYRIGHT π¦
2002-2004 Matt Sergeant, 2004-2011 Petr Cimprich. All rights reserved.
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Periodt. π
π«Ά Cute little sign-off: thisXML::SAX::ExpatXS(3)page is fromperl v5.42.0, dated2024-01-20. Bye bestie! π
π¦ where this page comes from
- opensuse-leap 16.0: perl-XML-SAX-ExpatXS 1.33-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-XML-SAX-ExpatXS 1.33-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-XML-SAX-ExpatXS 1.33-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-XML-SAX-ExpatXS 1.33-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms