anchor.diff:  %%-----------------------------------------------------------------------------
   %% Request construction
   %%-----------------------------------------------------------------------------
  +
  +%% ---------------- disco ----------------
  +
  +-spec discover_nodes(escalus_utils:jid_spec(), binary(), binary() | pubsub_node_id()) ->
  +                            exml:element().
  +discover_nodes(User, Id, {NodeAddr, NodeName}) ->
  +    QueryElement = escalus_stanza:query_el(?NS_DISCO_ITEMS, [{<<"node">>, NodeName}], []),
  +    iq(<<"get">>, User, Id, NodeAddr, [QueryElement]);
  +discover_nodes(User, Id, NodeAddr) ->
  +    QueryElement = escalus_stanza:query_el(?NS_DISCO_ITEMS, [], []),
  +    iq(<<"get">>, User, Id, NodeAddr, [QueryElement]).
  +
  +%% ---------------- create & delete ----------------
   
   -spec create_node(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
   create_node(User, Id, Node) ->
  
positive.code:     Elements = [create_node_element(NodeName) | configure_node_form(ConfigFields, undefined)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec request_configuration(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  request_configuration(User, Id, {NodeAddr, NodeName}) ->
      Elements = [#xmlel{ name = <<"configure">>,
                          attrs = [{<<"node">>, NodeName}] }],
      pubsub_owner_iq(<<"get">>, User, Id, NodeAddr, Elements).
  
  -spec configure_node(escalus_utils:jid_spec(), binary(), pubsub_node_id(),
                       [{binary(), binary()}]) ->
                              exml:element().
  configure_node(User, Id, {NodeAddr, NodeName}, ConfigFields) ->
      Elements = configure_node_form(ConfigFields, NodeName),
      pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec request_affiliations(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  request_affiliations(User, Id, {NodeAddr, NodeName}) ->
      Elements = [#xmlel{ name = <<"affiliations">>,
                          attrs = [{<<"node">>, NodeName}] }],
      pubsub_owner_iq(<<"get">>, User, Id, NodeAddr, Elements).
  
negative.code:     Elements = [subscriptions_element(NodeName, SubElements)],
      pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  %% ---------------- publish & items management ----------------
  
  -spec publish(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  publish(User, Id, {NodeAddr, NodeName}) ->
      Elements = [publish_element(NodeName, undefined)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec publish(escalus_utils:jid_spec(), binary(), exml:element(), binary(), pubsub_node_id()) ->
                       exml:element().
  publish(User, ItemId, ContentElement, Id, {NodeAddr, NodeName}) ->
      ItemElement = item_element(ItemId, ContentElement),
      Elements = [publish_element(NodeName, ItemElement)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec retract(escalus_utils:jid_spec(), binary(), pubsub_node_id(), binary()) -> exml:element().
  retract(User, Id, {NodeAddr, NodeName}, ItemId) ->
      Elements = [retract_item(NodeName, ItemId)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec get_all_items(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  get_all_items(User, Id, {NodeAddr, NodeName}) ->
      Elements = [items_element(NodeName)],
      pubsub_iq(<<"get">>, User, Id, NodeAddr, Elements).
  
  -spec purge_all_items(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  purge_all_items(User, Id, {NodeAddr, NodeName}) ->
      Elements = [purge_element(NodeName)],
      pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  %%-----------------------------------------------------------------------------
  %% XML element construction
  