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
Net::XMPP2::Parser(3) User Contributed Perl Documentation Net::XMPP2::Parser(3)

Net::XMPP2::Parser - Parser for XML streams (helper for Net::XMPP2)

   use Net::XMPP2::Parser;
   ...

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

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

new
This creates a new Net::XMPP2::Parser and calls "init".
set_stanza_cb ($cb)
Sets the 'XML stanza' callback.

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

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

set_error_cb ($cb)
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.
set_stream_cb ($cb)
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 Net::XMPP2::Node of the opening stream tag.
init
This methods (re)initializes the parser.
nseq ($namespace, $tagname, $cmptag)
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.

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

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

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

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