com.rsa.certj.xml

Class Canonicalizer

java.lang.Object
  |
  +--com.rsa.certj.xml.Canonicalizer

public class Canonicalizer
extends Object

This class defines the methods to canonicalize an XPath node-set, Node, and Attr objects.

Copyright © RSA Security Inc., 2001-2002. All rights reserved.


Field Summary

static String

S_XMLNS

Default namespace name.

static String

XML_NAMESPACE

Namespace URI for the prefix xml.

 

Constructor Summary

Canonicalizer()

 

 

Method Summary

static byte[]

canonicalizeNodeset(org.w3c.dom.Node node, boolean withComments)

Canonicalizes the Node object and all its descendants and produces an octet stream.

static byte[]

canonicalizeNodeset(org.w3c.dom.NodeList nodeList, boolean withComments)

Canonicalizes each node stored in the NodeList object and produces an octet stream.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_NAMESPACE

public static final String XML_NAMESPACE
Namespace URI for the prefix xml.

S_XMLNS

public static final String S_XMLNS
Default namespace name.
Constructor Detail

Canonicalizer

public Canonicalizer()
Method Detail

canonicalizeNodeset

public static byte[] canonicalizeNodeset(org.w3c.dom.Node node,
                                         boolean withComments)
                                  throws XMLException
Canonicalizes the Node object and all its descendants and produces an octet stream.

Parameters

         node  

The Node object to canonicalize.

         withComments  

A boolean indicating whether to include comment-nodes in the result. If true, the result contains comment-nodes; if false, it does not.

Returns

A byte array containing the canonicalized result. If the input node is null, this method returns null.

Throws

XMLException - If an error occurs while canonicalizing the input.

canonicalizeNodeset

public static byte[] canonicalizeNodeset(org.w3c.dom.NodeList nodeList,
                                         boolean withComments)
                                  throws XMLException
Canonicalizes each node stored in the NodeList object and produces an octet stream.

Parameters

         nodeList  

The NodeList object to canonicalize.

         withComments  

A boolean indicating whether to include comment-nodes in the result. If true, the result contains comment-nodes; if false, it does not.

Returns

A byte array containing the canonicalized result. If the input node is null, this method returns null.

Throws

XMLException - If an error occurs while canonicalizing the input.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000