If you insert the signature into the XML you invalidate it by changing the XML. Not sure what you hope to achieve by that.