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
POE::Filter::XML::Handler(3) User Contributed Perl Documentation POE::Filter::XML::Handler(3)

POE::Filter::XML::Handler - Default SAX Handler for POE::Filter::XML

version 1.140700

POE::Filter::XML::Handler is the default SAX handler for POE::Filter::XML. It extends XML::SAX::Base to provide different semantics for streaming vs. non-streaming contexts. This handle by default builds POE::Filter::XML::Nodes.

    is: ro, isa: Bool, default: false

not_streaming determines the behavior for the opening tag parsed. If what is being parsed is not a stream, the document will be parsed in full then placed into the finished_nodes attribute. Otherwise, the opening tag will be placed immediately into the finished_nodes bucket.

    is: rw, isa: POE::Filter::XML::Node

current_node holds the node being immediately parsed.

    is: ro, isa: ArrayRef, traits: Array

finished_nodes holds the nodes that have been completely parsed. Access to this attribute is provided through the following methods:

    handles =>
    {
        all_finished_nodes => 'elements',
        has_finished_nodes => 'count',
        add_finished_node => 'push',
        get_finished_node => 'shift',
    }

    is: ro, isa: ArrayRef, traits: Array

depth_stack holds the operating stack for the parsed nodes. As nodes are processed, ancendants of the current node are stored in the stack. When done they are popped off the stack. Access to this attribute is provided through the following methods:

    handles =>
    {
        push_depth_stack => 'push',
        pop_depth_stack => 'pop',
        depth => 'count',
    }

reset will clear the current node, the finished nodes, and the depth stack.

    (HashRef $data)

start_element is overriden from the XML::SAX::Base class to provide our custom behavior for dealing with streaming vs. non-streaming data. It builds Nodes then attaches them to either the root node (non-streaming) or as stand-alone top level fragments (streaming) sets them to the current node. Children nodes are appended to their parents before getting set as the current node. Then the base class method is called via super()

    (HashRef $data)

end_element is overriden from the XML::SAX::Base class to provide our custom behavior for dealing with streaming vs. non-streaming data. Mostly this method is in charge of stack management when the depth of the stack reaches certain points. In streaming documents, this means that top level fragments (not root) are popped off the stack and added to the finished_nodes collection. Otherwise a Node is created with stream_end set and added to the finished nodes.

Then the base class method is called via super()

    (HashRef $data)

characters merely applies the character data as text to the current node being processed. It then calls the base class method via super().

Nicholas R. Perez <nperez@cpan.org>

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.

2014-03-11 perl v5.32.1

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

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