class XMPP::XMLStreamReader

Overview

Incrementally frames top-level XML elements from an XMPP byte stream.

XMPP streams are intentionally not complete XML documents: the opening stream:stream remains open for the lifetime of the connection. This reader extracts that opening tag and every following top-level element while retaining partial and coalesced reads in an internal buffer.

Defined in:

xmpp/xml_stream_reader.cr

Constant Summary

DEFAULT_MAX_ELEMENT_SIZE = 1048576
DEFAULT_READ_SIZE = 4096
STRICT_XML_OPTIONS = XML::ParserOptions::NONET

Constructors

Instance Method Summary

Constructor Detail

def self.new(io : IO, max_element_size : Int32 = DEFAULT_MAX_ELEMENT_SIZE, read_size : Int32 = DEFAULT_READ_SIZE) #

[View source]

Instance Method Detail

def read_node : XML::Node #

[View source]