Generating an enveloped digital signature on a partial in-memory XML file