diff --git a/lib/feed_reader.ex b/lib/feed_reader.ex index b23d97a..e912389 100644 --- a/lib/feed_reader.ex +++ b/lib/feed_reader.ex @@ -286,8 +286,8 @@ defmodule FeedReader do @doc """ Collects a caller-owned local XML file into a bounded parse result. - The parser continues through the end of the source so malformed tails are - reported. An item accepted beyond the limit returns + The parser stops after the feed's root element, ignoring content appended + after a complete feed. An item accepted beyond the limit returns `{:error, {:max_items_exceeded, max_items}}` without partial data. ## Options diff --git a/lib/feed_reader/collector.ex b/lib/feed_reader/collector.ex index 9b36f60..65ed21d 100644 --- a/lib/feed_reader/collector.ex +++ b/lib/feed_reader/collector.ex @@ -5,8 +5,8 @@ defmodule FeedReader.Collector do The collector consumes the event stream produced by `FeedReader.Parser` and returns a `FeedReader.ParseResult`. Callers must provide a positive integer `:max_items`; accepted items beyond that limit produce an error instead of a - partial result. The parser continues through its terminal event so malformed - tails are not hidden by the collection limit. + partial result. The parser stops after the feed's root element, so content + appended after a complete feed is not parsed. Binary and chunk-enumerable inputs are written incrementally to a temporary file before parsing. The temporary file is owned and removed by the collector;