Pulling campaign key by specifying campaign name via XPATH
For the following XML snippet -
<response uri="http://campaigns.zoho.com/api/recentsentcampaigns" version="1">
<status>success</status>
<code>0</code>
<recent-sent-campaigns>
<campaign no="1">
<fl val="campaign_key">somekeyvalue</fl>
<fl val="sent_date_string">08 Jun 2015, 11:55 PM</fl>
<fl val="sent_time">1433850936000</fl>
<fl val="campaign_name">Test for Mailing List</fl>
<fl val="created_date_string">08 Jun 2015, 10:38 PM</fl>
<fl val="campaigntype">normal</fl><fl val="created_time">1433846306000</fl>
</campaign>
</recent-sent-campaigns>
</response>
I want to get the campaign_key text by specifying the campaign_name text. I know how to return the campaign_key text by specifying the campaign no (in this case, "1") but I need to be able to pass the campaign_name as an argument (in this case, "Test for Mailing List") and return the key (in this case, "
somekeyvalue ").