anchor.diff:  
   -spec new_parser() -> {ok, parser()} | {error, any()}.
   new_parser() ->
  +    new_parser(single_doc).
  +
  +-spec new_parser(parser_type()) -> {ok, parser()} | {error, any()}.
  +new_parser(Type)->
       try
           {ok, EventParser} = exml_event:new_parser(),
  -        {ok, #parser{event_parser = EventParser}}
  +        {ok, prepare_parser(#parser{event_parser = EventParser, type = Type})}
       catch
           E:R ->
               {error, {E, R}}
  
positive.code: -include("exml_stream.hrl").
  
  -export([new_parser/0,
           parse/2,
           reset_parser/1,
           free_parser/1]).
  -export_type([parser/0]).
  
  -record(parser, {
          event_parser,
          stack = []
  }).
  
  
negative.code: %%%===================================================================
  %%% Helpers
  %%%===================================================================
  -spec prepare_parser(#parser{}) -> {ok, #parser{}}.
  prepare_parser(#parser{type = single_doc} = Parser) ->
      {ok,Parser};
  prepare_parser(#parser{type = multiple_docs} = Parser) ->
      %% open fake stream tag and discard events
      %% use random bytes to reduce probability of closing the tag by user
      <<I:128/integer>> = crypto:rand_bytes(16),
      Tag = list_to_binary(erlang:integer_to_list(I,16)),
      {ok, NewParser, _ } = parse(Parser, <<"<_",Tag/binary,">">>),
      {ok, NewParser}.
  
  -spec parse_events(list(), list(), list()) -> {list(xmlstreamelement()), list()}.
  parse_events([], Stack, Acc) ->
  