Discuss this help topic in SecureBlackbox Forum
Decrypt the XML node(s)
After you called Decrypt() method of TElXMLDecryptor class to perform decryption, you need to check the value of EncryptedDataType. If the property value is xedtElement, the decrypted node is contained in DecryptedNode property. If the property value is xedtContent, then the decrypted nodes can be contained in DecryptedNode property if there was only one node decrypted, or in DecryptedNodeList property if there were several nodes decrypted.
After you've decrypted the node(s), you need to put them back to the right place of the document. You need to replace the EncryptedData element with the node(s) that were decrypted. This is done using ReplaceChild() method of the parent node, if you have just one decrypted node, or using InsertBefore() method of the parent node when you need to insert several elements. Note, that TElXMLDOMNodeList class, which contains the nodes in DecryptedNodeList property, owns the nodes, so you can't add those nodes directly. You need to use CloneNode() method of the node and add the clone to the document (as the original will be destroyed in future).