anchor.diff:  				    data = PIDF_Doc
   				   }}
   	    catch
  +		error : Y ->
  +		    ST = erlang:get_stacktrace(),
  +		    logger:log(error, "Presence PIDF: Could not parse pidf-xml data,~ncaught error : "
  +			       "~p ~p", [Y, ST]),
  +		    {error, bad_xml};
   		X : Y ->
   		    logger:log(error, "Presence PIDF: Could not parse pidf-xml data, caught ~p ~p", [X, Y]),
   		    {error, bad_xml}
  
positive.code: %%           PIDF_Doc = pidf_doc record()
  %%           Reason   = atom()
  parse_pidf_xml(#xmlElement{name = presence} = XML) ->
      [Entity] = get_xml_attributes(entity, XML#xmlElement.attributes),
  
      Comment =
  
negative.code: %%           PIDF_Doc = pidf_doc record()
  %%           Reason   = atom()
  parse_pidf(pidf, XML) when is_list(XML) ->
      try xmerl_scan:string(XML, [{namespace_conformant, true}]) of
  	{XMLtag, []} ->
  	    try parse_pidf_xml(XMLtag) of
  		{ok, PIDF_Doc} ->
  