anchor.diff:           end;
         {fatal_error,_Line, Reason, _EndTags, State2} -> % trailing content in a document
            ?dbg("Reason",Reason),
  -         case maps:size(State2#state.nodes) of
  +         case ets:info(State2#state.nodes,size) of
  +         %case maps:size(State2#state.nodes) of
               1 -> % invalid document
                  {error,Reason};
               _ ->
  
positive.code:                 #{file  => Name,
                    base  => Name,
                    nodes => map_to_bin(State2#state.nodes),
                    texts => State2#state.texts,
                    names => State2#state.names,
                    namsp => State2#state.namsp,
                    att_types => State2#state.att_types}
  
negative.code:    State4 = add_node(State3, Record),
     State4#state{counter = C +1};   
  
  handle_event({comment, String0}, _Ln, #state{counter = C,
                                              stack = [P|_]} = State) -> 
     String = String0,%unicode:characters_to_binary(String0),
     {TxId, State1} = get_text_id(State, String),
     Record = #nodes{id = C, 
                     tp = comment,
  