GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  POE::FILTER::XML (3)

.ds Aq ’

NAME

POE::Filter::XML - XML parsing for the POE framework

CONTENTS

VERSION

version 1.140700

SYNOPSIS



 use POE::Filter::XML;
 my $filter = POE::Filter::XML->new();

 my $wheel = POE::Wheel:ReadWrite->new(
        Filter          => $filter,
        InputEvent      => input_event,
 );



DESCRIPTION

POE::Filter::XML provides POE with a completely encapsulated XML parsing strategy for POE::Wheels that will be dealing with XML streams.

The parser is XML::LibXML

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. This is handy for XMLRPC or other short documents.

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. 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.

    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.

    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.

    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. 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.

PRIVATE_METHODS

    BUILD

A BUILD method is provided to parse the initial buffer (if any was included when constructing the filter).

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 POE::FILTER::XML (3) 2014-03-11

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.