org.neuclear.xml.c14
Class Canonicalizer
java.lang.Object
org.neuclear.xml.AbstractElementProxy
org.neuclear.xml.xmlsec.AbstractXMLSigElement
org.neuclear.xml.transforms.Transform
org.neuclear.xml.transforms.XPathTransform
org.neuclear.xml.c14.Canonicalizer
- All Implemented Interfaces:
- ElementProxy
- Direct Known Subclasses:
- CanonicalizerWithComments, CanonicalizerWithoutSignature
public class Canonicalizer
- extends XPathTransform
XML Canonicalizer.
This "mostly" supports the W3C
Canonical XML standard.
Usage:
Canonicalizer canon=new Canonicalizer(writer);//writer is a preinitialized instance of a java.io.Writer
canon.canonicalize(doc); // Canonicalizes the document or element and outputs it to the writer
|
Method Summary |
byte[] |
canonicalize(java.lang.Object node)
Canonicalizes a node and outputs it to the writer |
byte[] |
canonicalizeSubset(org.dom4j.Node node,
java.lang.String xpath)
Creates a subset of a node based on it's xpath and outputs it to the writer
Note, for this to return wellformed xml the xpath most be formatted to produce it. |
| Methods inherited from class org.neuclear.xml.AbstractElementProxy |
addElement, addElement, addElement, addElement, addElement, addLineBreak, asXML, canonicalize, createAttribute, createQName, getElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XPATH_WO_COMMENTS
public static final java.lang.String XPATH_WO_COMMENTS
- See Also:
- Constant Field Values
LF
public static final java.lang.String LF
C14NTYPE_NORMAL
public static final int C14NTYPE_NORMAL
- See Also:
- Constant Field Values
C14NTYPE_WITH_COMMENTS
public static final int C14NTYPE_WITH_COMMENTS
- See Also:
- Constant Field Values
ALGORITHM
public static final java.lang.String ALGORITHM
- See Also:
- Constant Field Values
Canonicalizer
public Canonicalizer()
Canonicalizer
protected Canonicalizer(java.lang.String algorithm,
java.lang.String xpath)
canonicalize
public final byte[] canonicalize(java.lang.Object node)
throws XMLSecurityException
- Canonicalizes a node and outputs it to the writer
- Parameters:
node -
- Throws:
XMLSecurityException
canonicalizeSubset
public final byte[] canonicalizeSubset(org.dom4j.Node node,
java.lang.String xpath)
throws java.io.IOException
- Creates a subset of a node based on it's xpath and outputs it to the writer
Note, for this to return wellformed xml the xpath most be formatted to produce it.
- Parameters:
node - nodexpath - subset expression
- Throws:
java.io.IOException
Copyright © 2002-2004 Antilles Software Ventures SA. All Rights Reserved.