First 16 characters replaced after decrypting AES encrypted string I encrypted the string below using AES  

&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;ValidationRequest&gt;
    &lt;ID&gt;1234567890&lt;/ID&gt;
&lt;/ValidationRequest&gt;

and after decryption, the first 16 characters of the xml was replaced with special characters as shown below:

Q)ZvZ~J+/De*.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;ValidationRequest&gt;
    &lt;ID&gt;1234567890&lt;/ID&gt;
&lt;/ValidationRequest&gt;

What went wrong?
Most likely you are using CBC mode, and most likely you did not supply the correct IV during the decryption process, resulting in improper decryption of the first block.

The IV should be supplied as part of the encryption process, and be different for every message, and be included with the ciphertext so that it is available for decryption. More than likely at least one of those did not occur.