anchor.diff:    case [E || #xmlElement{} = E <- TopChildren] of
       [#xmlElement{name = params, content = Children}] ->
         % decoding requires stripping non-tag children
  -      case decode_results([E || #xmlElement{} = E <- Children]) of
  -        {error, _Reason} = Error ->
  -          % decode_results() normally doesn't return tuple
  -          Error;
  -        Result ->
  -          {ok, result, Result}
  -      end;
  +      Result = decode_results([E || #xmlElement{} = E <- Children]),
  +      {ok, result, Result};
       [#xmlElement{name = fault, content = Children}] ->
         % decoding requires stripping non-tag children
  -      case decode_faults([E || #xmlElement{} = E <- Children]) of
  -        {error, _Reason} = Error ->
  -          Error;
  -        {_Code, _Message} = Exception ->
  -          {ok, exception, Exception}
  -      end;
  -    _Any ->
  -      {error, bad_xml_structure}
  +      Exception = decode_faults([E || #xmlElement{} = E <- Children]),
  +      {ok, exception, Exception}
     end.
   
   
  
positive.code: parse(XML, Opts) when is_binary(XML) ->
    parse(binary_to_list(XML), Opts);
  parse(XML, _Opts) when is_list(XML) ->
    {Document, _Rest} = xmerl_scan:string(XML),
    decode_document(Document).
  
  %% @doc Parse XML message to request.
  %%
  
negative.code:   #xmlElement{}.
  
  extract_child(Children) ->
    [Child] = [E || #xmlElement{} = E <- Children],
    Child.
  
  %% }}}
  %%----------------------------------------------------------
  