My c# program reads an xml and loads it in xmldocument. I need to decrypt bankaccount number and sortcode elements before it is displayed in the user interface. Here is the xml.
<Fatca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/TaskDetails.xsd">
<AccountNumber>BI830418</AccountNumber>
<AccountDetails>
<AccountName>SIPP - Mr. t test</AccountName>
<AccountNumber>BI830418</AccountNumber>
<AccountID>83041</AccountID>
<BankAccountDetails>
<BankAccountID>23943</BankAccountID>
<ContactID>2106175</ContactID>
<BankAccountName>dffdf</BankAccountName>
<BankAccountNumber>N14yKOOmpdmh23fmp7oNvg==</BankAccountNumber>
<BankAccountType>0</BankAccountType>
<BankSortCode>tz7r+uYFL6Ff86mI/mwJOQ==</BankSortCode>
<Active>true</Active>
</BankAccountDetails>
<Active>true</Active>
</AccountDetails>
<Request>
<AccountID>83041</AccountID>
</Request>
</Fatca>
My c# code logic is as follows. I get object reference error. Could you let me know whats the mistake here ?
document.XPathSelectElement("//BankAccountDetails/BankAccountNumber").Value = "Test";