This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
That can be done in three steps: decrypt the XML file, append to the file using your favorite XMl API, encrypt the file. But this seems too obvious, so I think I'm missing something in your question. Are you possibly asking whether you can add to the file without decrypting it? That would be impossible.
i have one encrypted xml file which is encrypted using public key... now i want to add some data in that encrypted xml file..
To add any data in an encrypted file, you need to decrypt it first. Now as you are talking of encryption with a public key, you need to have the private key for decryption. and again i want to encrypt that using another public key...
Once you have decrypted the file, edit it, add the data and then encrypt it using your public key