anchor.diff:  % stolen from trapexit.org :-)
   list_to_term(String) ->
       {ok, T, _} = erl_scan:string(String++"."),
  -    case erl_parse:parse_term(T) of
  +    case catch erl_parse:parse_term(T) of
           {ok, Term} ->
               {ok, Term};
           Error ->
  
positive.code: % transform entity from {list(), list()} to {atom(), term()}
  transform_entity({Tag, [Value|Rest]}) when
      is_tuple(Value)->
  	{list_to_atom(Tag), transform_entity_list([Value|Rest])};
  transform_entity({Tag, String})->
      case list_to_term(String) of
  	{ok, Value}->
  
negative.code: 
  % actual reading of the config
  do_read_xml_config(ConfigFile)->
      case catch xmerl_sax_parser:file(ConfigFile,
  	    [{event_fun, fun event/3},
  	    {event_state, []}]) of
  	{ok, EntityList, _}->
  	    {ok, lists:reverse(transform_entity_list(EntityList))};
  	Oops->
  	    {error, parsing_failed, Oops}
      end.
  
  % event callback for xmerl_sax_parser
  event(Event, _LineNo, State) ->
  