Assume i have the following XML data:
<?xml version="1.0" encoding="utf-8" ?>
<Accounts>
<Account name="Account1">
<Campaign name="Camp1">
<RemoteCampaign>RC1</RemoteCampaign>
<RemoteCampaign>RC2</RemoteCampaign>
</Campaign>
<Campaign name="Camp2">
<RemoteCampaign>RC3</RemoteCampaign>
</Campaign>
</Account>
<Account name="Account2">
<Campaign name="Camp3">
<RemoteCampaign>RC4</RemoteCampaign>
</Campaign>
<Campaign name="Camp4">
<RemoteCampaign>RC5</RemoteCampaign>
</Campaign>
</Account>
</Accounts>
I need to determine the Campaign name when given the account and the remote campaign name. Is there an easy way to do this in Linq to Xml? It can be assumed that all values are unique.