enc.XMLCipher2 reads an XML document and encrypts the part of it specified by an XPath expression using a template file:
% java enc.XMLCipher2 -e keyinfo.xml hotcop.xml /SONG/PUBLISHER template1.xml
API
org.apache.xml.security.c14n.Canonicalizer
I have not been able to build this. No precompiled binaries yet.