1AnyEvent::XMPP::Parser(U3s)er Contributed Perl DocumentatAinoynEvent::XMPP::Parser(3)
2
3
4

NAME

6       AnyEvent::XMPP::Parser - Parser for XML streams (helper for
7       AnyEvent::XMPP)
8

SYNOPSIS

10          use AnyEvent::XMPP::Parser;
11          ...
12

DESCRIPTION

14       This is a XMPP XML parser helper class, which helps me to cope with the
15       XMPP XML.
16
17       See also AnyEvent::XMPP::Writer for a discussion of the issues with XML
18       in XMPP.
19

METHODS

21       new This creates a new AnyEvent::XMPP::Parser and calls "init".
22
23       set_stanza_cb ($cb)
24           Sets the 'XML stanza' callback.
25
26           $cb must be a code reference. The first argument to the callback
27           will be this AnyEvent::XMPP::Parser instance and the second will be
28           the stanzas root AnyEvent::XMPP::Node as first argument.
29
30           If the second argument is undefined the end of the stream has been
31           found.
32
33       set_error_cb ($cb)
34           This sets the error callback that will be called when the parser
35           encounters an syntax error. The first argument is the exception and
36           the second is the data which caused the error.
37
38       set_stream_cb ($cb)
39           This method sets the stream tag callback. It is called when the
40           <stream> tag from the server has been encountered.  The first
41           argument to the callback is the AnyEvent::XMPP::Node of the opening
42           stream tag.
43
44       init
45           This methods (re)initializes the parser.
46
47       cleanup
48           This methods removes all handlers. Use it to avoid circular
49           references.
50
51       nseq ($namespace, $tagname, $cmptag)
52           This method checks whether the $cmptag matches the $tagname in the
53           $namespace.
54
55           $cmptag needs to come from the XML::Parser::Expat as it has some
56           magic attached that stores the namespace.
57
58       feed ($data)
59           This method feeds a chunk of unparsed data to the parser.
60

AUTHOR

62       Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"
63
65       Copyright 2007, 2008 Robin Redeker, all rights reserved.
66
67       This program is free software; you can redistribute it and/or modify it
68       under the same terms as Perl itself.
69
70
71
72perl v5.38.0                      2023-07-20         AnyEvent::XMPP::Parser(3)
Impressum