Feedistiller.Feeder (feedistiller v3.2.0)
Elixir encapsulation over the feeder
module, allowing full usage
of the stream API. This is a very straightforward encapsulation with
direct mapping to feeder
functions and minimal sugar over feeder
records to map them to structs.
Link to this section Summary
Functions
Parse a file. Mapping to :feeder.file/2
with default options.
Parse a file. Mapping to :feeder.file/2
.
Parse some data.
Parse a file. Mapping to :feeder.stream/2
.
Link to this section Types
wd()
Specs
wd() :: DateTime.t() | nil
wl()
Specs
wl() :: integer() | nil
ws()
Specs
ws() :: String.t() | nil
Link to this section Functions
file(filename)
Specs
file(String.t()) :: {:ok, Feedistiller.Feeder.Channel.t(), String.t()} | {term(), term(), term(), term(), Feedistiller.Feeder.Channel.t()}
Parse a file. Mapping to :feeder.file/2
with default options.
See xml_sax_parser
documentation for full result type (in case of error, an
incomplete Channel
is returned as the last item of the error tuple).
file(filename, opts)
Specs
Parse a file. Mapping to :feeder.file/2
.
See xml_sax_parser
documentation for full result type (in case of error, an
incomplete accumulator is returned as the last item of the error tuple).
stream(opts)
Specs
stream(String.t() | Keyword.t()) :: {:ok, Feedistiller.Feeder.Channel.t(), String.t()} | {term(), term(), term(), term(), Feedistiller.Feeder.Channel.t()}
Parse some data.
If the input parameter is a string, it will map to :feeder.stream/2
with default options.
If it's a prop list, it will map to :feeder.stream/2
after calling your continuation function
once to bootstrap the data (curiously xml_sax_parser
does not do that automatically).
See xml_sax_parser
documentation for full result type (in case of error, an
incomplete Channel
is returned as the last item of the error tuple).
stream(data, opts)
Specs
stream(String.t(), Keyword.t()) :: {:ok, term(), String.t()} | {term(), term(), term(), term(), term()}
Parse a file. Mapping to :feeder.stream/2
.
See xml_sax_parser
documentation for full result type (in case of error, an
incomplete accumulator is returned as the last item of the error tuple).