This is a DOMHASH calculation package conforming to SAX and DOM. This does not depend on any SAX/DOM implementation.
This library requires JDK 1.1 (or later) and a SAX Parser or a DOM implementation.
To get digest values, call getDigest(MessageDigest md, Node node)
of com.ibm.dom.util.Digest
class.
![]() |
Applications should implement NamespaceDocumentHandler
.
When an application want a digest value of an element,
call DigestFilter#enable()
with a MessageDigest
instance
in startElement()
method for the target element.
The application can get the digest value of the element
with DigestFilter#getDigest()
in endElement()
method for the target element.
See SAXSample.java.
When an application want a digest value of the root element,
create a DigestFilter
instance with DigestFilter(MessageDigest)
constructor.
and call Parser#parse()
and DigestFilter#getDigest()
.
See SAXDigestTest.java.