POE::Filter::XML(3pm)
β¨ POE::Filter::XML β¨
okay bestie, sit DOWN, because we're talking about POE::Filter::XML β the User Contributed Perl Documentation page for XML parsing in the POE framework. It's giving parser-girlie. It's giving stream. π
πΈ VERSION πΈ
version 1.140700 β yes she has a version number, and yes it's iconic.
π¦ SYNOPSIS π¦
use POE::Filter::XML;
my $filter = POE::Filter::XML->new();
my $wheel = POE::Wheel:ReadWrite->new(
Filter => $filter,
InputEvent => 'input_event',
);
literally just vibes and a filter. that's the whole setup. π«Ά
π DESCRIPTION π
So, POE::Filter::XML hands POE a completely encapsulated XML parsing strategy for POE::Wheels that are gonna be dealing with XML streams. All wrapped up, all self-contained, no mess. π
The parser is XML::LibXML. that's the one doing the heavy lifting, she's the main character.
π PUBLIC_ATTRIBUTES π
π not_streaming
is: ro, isa: Bool, default: false
Setting the not_streaming attribute to true via new() will put this filter into non-streaming mode, meaning that whole documents are parsed before nodes are returned. handy for XMLRPC or other short documents β like, if the doc is tiny, why stream it, you know? π
π PRIVATE_ATTRIBUTES π
π buffer
is: ro, isa: ArrayRef, traits: Array
buffer holds the raw data to be parsed. Raw data should be split on network new lines before being added to the buffer. Not optional bestie, that's the rule. π¨
Access to this attribute is provided by the following methods:
handles =>
{
has_buffer => 'count',
all_buffer => 'elements',
push_buffer => 'push',
shift_buffer => 'shift',
join_buffer => 'join',
}
π§ callback
is: ro, isa: CodeRef
callback holds the CodeRef to be call in the event that there is an exception generated while parsing content. By default it holds a CodeRef that simply calls Carp::confess. so like, if something goes wrong, she WILL be telling you about it. loudly. π
β handler
is: ro, isa: POE::Filter::XML::Handler
handler holds the SAX handler to be used for processing events from the parser. By default POE::Filter::XML::Handler is instantiated and used. β¨
The "not_streaming" attribute is passed to the constructor of Handler. yes, they talk to each other, it's a whole friendship. π«Ά
π parser
is: ro, isa: XML::LibXML
parser holds an instance of the XML::LibXML parser. The "handler" attribute is passed to the constructor of XML::LibXML. π¦
π₯ PUBLIC_METHODS π₯
π get_one_start
(ArrayRef $raw?)
This method is part of the POE::Filter API. See "get_one_start" in POE::Filter for an explanation of its usage. iykyk.
πΈ get_one
returns (ArrayRef)
This method is part of the POE::Filter API. See "get_one" in POE::Filter for an explanation of its usage. π
π¦ put
(ArrayRef $nodes) returns (ArrayRef)
This method is part of the POE::Filter API. See "put" in POE::Filter for an explanation of its usage. β¨
π PROTECTED_METHODS π
π reset
reset() is an internal method that gets called when either a stream_start(1) POE::Filter::XML::Node gets placed into the filter via "put", or when a stream_end(1) POE::Filter::XML::Node is pulled out of the queue of finished Nodes via "get_one".
This facilitates automagical behavior when using the Filter within the XMPP protocol that requires many new stream initiations. many. so many. she's handling it. π§
This method is also called after every document when not in streaming mode. Useful for handling XMLRPC processing. β
This method really should never be called outside of the Filter, but it is documented here in case the Filter is used outside of the POE context. fr fr, don't touch unless you know what you're doing, bestie. π
π PRIVATE_METHODS π
π BUILD
A BUILD method is provided to parse the initial buffer (if any was included when constructing the filter). she does a little setup, she gets things ready, she slays. π
π AUTHOR π
Nicholas R. Perez <nperez@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2014 by Nicholas R. Perez <nperez@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free software, free girlie. π
and that's the whole page, bestie!! this was generated by perl v5.34.0 on 2022-06-17, for POE::Filter::XML(3pm) β periodt. πβ¨π
π¦ where this page comes from
- debian bookworm: libpoe-filter-xml-perl 1.140700-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpoe-filter-xml-perl 1.140700-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpoe-filter-xml-perl 1.140700-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpoe-filter-xml-perl 1.140700-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpoe-filter-xml-perl 1.140700-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms