Encrypting XML Element

Posted by Kanta on Stack Overflow See other posts from Stack Overflow or by Kanta
Published on 2010-03-04T19:59:36Z Indexed on 2010/05/14 9:04 UTC
Read the original article Hit count: 216

Filed under:

I have created XML file called users.xml Looks like this:

<Users>
  <user>
    <uin>"0012345"</uin>
    <name>black</name>
    <email>"[email protected]"</email>
    <created>"3/02/2010"</created>
  </user>
  <user>
    <uin>"123456780"</uin>
    <name>sam</name>
    <email>"[email protected]"</email>
    <created>"3/02/2010"</created>
  </user>
  <user>
    <uin>"123456799"</uin>
    <name>kblack</name>
    <email>"[email protected]"</email>
    <created>"3/02/2010"</created>
  </user>
</Users>

I want to encrypt the element. Using code like

XmlElement uinelement = (XmlElement)xmldoc.SelectSingleNode("Users/user/uin");

...encrypts only first UIN from the user.xml file.

How can I Encrypt all UIN elements?

Thank you
Kanta

© Stack Overflow or respective owner

Related posts about ASP.NET