I\'m trying to digitally sign an XML document using Java. I\'ve got an implementation working with some references I\'ve found that use various implementations in the javax.xml.
Have look at Apache XML Security. To use the package to generate and verify a signature, checkout the samples in src_samples/org/apache/xml/security/samples/signature/.