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  -  ANYEVENT::XMPP::PARSER (3)

.ds Aq ’

NAME

AnyEvent::XMPP::Parser - Parser for XML streams (helper for AnyEvent::XMPP)

CONTENTS

SYNOPSIS



   use AnyEvent::XMPP::Parser;
   ...



DESCRIPTION

This is a XMPP XML parser helper class, which helps me to cope with the XMPP XML.

See also AnyEvent::XMPP::Writer for a discussion of the issues with XML in XMPP.

METHODS

<B>newB> This creates a new AnyEvent::XMPP::Parser and calls init.
<B>set_stanza_cb ($cb)B> Sets the ’XML stanza’ callback.

$cb must be a code reference. The first argument to the callback will be this AnyEvent::XMPP::Parser instance and the second will be the stanzas root AnyEvent::XMPP::Node as first argument.

If the second argument is undefined the end of the stream has been found.

<B>set_error_cb ($cb)B> This sets the error callback that will be called when the parser encounters an syntax error. The first argument is the exception and the second is the data which caused the error.
<B>set_stream_cb ($cb)B> This method sets the stream tag callback. It is called when the <stream> tag from the server has been encountered. The first argument to the callback is the AnyEvent::XMPP::Node of the opening stream tag.
<B>initB> This methods (re)initializes the parser.
<B>cleanupB> This methods removes all handlers. Use it to avoid circular references.
<B>nseq ($namespace, B>$tagname<B>, B>$cmptag<B>)B> This method checks whether the $cmptag matches the $tagname in the $namespace.

$cmptag needs to come from the XML::Parser::Expat as it has some magic attached that stores the namespace.

<B>feed ($data)B> This method feeds a chunk of unparsed data to the parser.

AUTHOR

Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>

COPYRIGHT & LICENSE

Copyright 2007, 2008 Robin Redeker, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

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


perl v5.20.3 ANYEVENT::XMPP::PARSER (3) 2012-12-25

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