Document document = builder.parse(file);
Element signatureElement = (Element) document.getElementsByTagNameNS("http://www.w3.org/2000/09/xmldsig#", "Signature").item(0);
((Element) signatureElement.getParentNode()).setIdAttributeNS(null, "Id", true);
XMLSignature xmlSignature = new XMLSignature(signatureElement, "", true);
xmlSignature.checkSignatureValue(cert);
}
protected File doStreamingEncryptionOutbound(File file, int tagCount) throws Exception {
final File signedFile = new File(getTmpFilePath(), "encryption-stax-" + tagCount + ".xml");