NAME

XML::SAX::ExpatNB - A nonblocking filehandle oriented XML::SAX parser, and a namespace consistency link, from XML::Parser::ExpatNB to XML::SAX::Expat::Incremental.

SYNOPSIS

use XML::SAX::ExpatNB;
my $nb_parser = XML::SAX::ExpatNB->new; # use XML::SAX::ParserFactory

$nb->parse_file($fh)
	if $data;

DESCRIPTION

XML::Parser::Expat has a variation, called XML::Parser::ExpatNB which is rather stupidly named, IMHO. It's a useful module, though, and in case you got here from there looking for an XML::SAX based wrapper for it, then one exists, but is not named XML::SAX::ExpatNB. It's called XML::SAX::Expat::Incremental.

This module implements nonblocking reads on a handle, and parses that data using XML::SAX::Expat::Incremental. It relies on "blocking" in IO::Handle.

METHODS

parse_file FH

Reads as much data as possible from FH, without blocking, and parse it.

Accepts the parameter ReadOnce, whose value is the number of bytes to read, as an option.

parse_once FH [ BYTES ]

Reads BYTES bytes from FH (defaults to 4096), and parse them, without blocking.

SEE ALSO

XML::Parser, XML::SAX, XML::SAX::Expat, XML::SAX::Expat::Incremental

AUTHOR

Yuval Kogman <nothingmuch@woobling.org>

COPYRIGHT & LICENSE

Copyright (c) 2005 Yuval Kogman. All rights reserved
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.