anchor.diff:    #xmlElement{}.
   
   extract_child(Children) ->
  -  case [E || #xmlElement{} = E <- Children] of
  -    [Child] -> Child;
  -    _Any -> throw({error, bad_xml_structure})
  -  end.
  +  [Child] = [E || #xmlElement{} = E <- Children],
  +  Child.
   
   %% }}}
   %%----------------------------------------------------------
  
positive.code:   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;
      [#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}
    end.
  
  
  
negative.code: %%   members: `faultString' and `faultCode', in any order).
  %%
  %% @spec decode_faults([#xmlElement{}]) ->
  %%   {Code :: integer(), Message :: binary()}
  
  -spec decode_faults([#xmlElement{}]) ->
    {integer(), binary()}.
  
  decode_faults([#xmlElement{name = value, content = Children}] = _Elements) ->
    ChildTags = [E || #xmlElement{} = E <- Children],
    [#xmlElement{name = struct} = FaultStruct] = ChildTags,
    % expect <faultString/> and <faultCode/> in any order
    case decode_value(FaultStruct) of
      [{<<"faultString">>, Message}, {<<"faultCode">>, Code}] ->
        {Code, Message};
      [{<<"faultCode">>, Code}, {<<"faultString">>, Message}] ->
        {Code, Message}
    end.
  
  %% @doc Decode single value (scalar, array or struct) recursively.
  %%
  %% @spec decode_value(XMLElement :: #xmlElement{}) ->
  %%   jsx_value()
  
  -spec decode_value(#xmlElement{}) ->
    jsx_value().
  
  decode_value(#xmlElement{name = i4} = E) ->
    decode_int(E);
  decode_value(#xmlElement{name = int} = E) ->
    decode_int(E);
  decode_value(#xmlElement{name = boolean} = E) ->
    decode_boolean(E);
  decode_value(#xmlElement{name = string} = E) ->
    decode_string(E);
  decode_value(#xmlElement{name = double} = E) ->
    decode_double(E);
  %decode_value(#xmlElement{name = dateTime.iso8601} = E) ->
  %  decode_dateTime_iso8601(E);
  %decode_value(#xmlElement{name = base64} = E) ->
  %  decode_base64(E);
  decode_value(#xmlElement{name = nil} = E) ->
    decode_nil(E);
  decode_value(#xmlElement{name = struct} = E) ->
    decode_struct(E);
  decode_value(#xmlElement{name = array} = E) ->
    decode_array(E).
  
  %% @doc Decode integer value.
  