c14n.C14nDOM
reads an XML document from stdin
and writes the canonicalized output to stdout:
% java c14n.C14nDOM -xpath < hotcop.xml > canonicalized_hotcop.xml
-xpath option necessary to support the final draft of Canonical XML 1.0.
API in com.ibm.xml.dsig.Canonicalizer
package com.ibm.xml.dsig;
public interface Canonicalizer {
public static final String W3C
= "http://www.w3.org/TR/2000/WD-xml-c14n-20000119"
public static final java.lang.String W3C2
= "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
public static final java.lang.String W3C2WC
= "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
public static final java.lang.String EXCLUSIVE;
public static final java.lang.String EXCLUSIVEWC;
public String getURI();
public void canonicalize(org.w3c.dom.Node node, OutputStream stream)
throws IOException;
}
Implementations include:
com.ibm.xml.dsig.transform.ExclusiveC11r
com.ibm.xml.dsig.transform.ExclusiveC11rWC
com.ibm.xml.dsig.transform.W3CCanonicalizer
com.ibm.xml.dsig.transform.W3CCanonicalizer2
com.ibm.xml.dsig.transform.W3CCanonicalizer2WC
CVS only; won't build
DOMWriter