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

Specs

wd() :: DateTime.t() | nil

Specs

wl() :: integer() | nil

Specs

ws() :: String.t() | nil

Link to this section Functions

Specs

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).

Link to this function

file(filename, opts)

Specs

file(String.t(), list()) ::
  {:ok, term(), String.t()} | {term(), term(), term(), term(), term()}

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).

Specs

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).

Link to this function

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).