Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java 1.0.4 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----com.ibm.xml.parser.NOOPVisitor | +----com.ibm.xml.parser.MakeDigestVisitor
Digests can be made for the following Node types:
The following sample code uses the MakeDigestVisitor on a hierarchy of nodes:
MakeDigestVisitor makeDigestVisitor = new MakeDigestVisitor(this.getFactory().createMessageDigest()); new NonRecursivePreorderTreeTraversal(makeDigestVisitor).traverse(this);
Field Summary | |
java.security.MessageDigest | messageDigest
|
Constructor Summary | |
MakeDigestVisitor(java.security.MessageDigest messageDigest)
|
Method Summary | |
void | visitAttributePre(TXAttribute attribute)
|
void | visitCommentPre(TXComment comment)
|
void | visitElementPost(TXElement element)
|
void | visitElementPre(TXElement element)
|
void | visitPIPre(TXPI pi)
|
void | visitTextPre(TXText text)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.security.MessageDigest messageDigest
Constructor Detail |
public MakeDigestVisitor(java.security.MessageDigest messageDigest)
messageDigest
- Message digest instance to use when visitting.
Method Detail |
public void visitElementPre(TXElement element) throws ToNextSiblingTraversalException
element
- Node to calculate and set a digest.
public void visitElementPost(TXElement element) throws LibraryException
A digest of a TXElement Node consists of its:
String#compareTo()
).
element
- Node to calculate and set a digest.
UnicodeBigUnmarked
encoding,
or the JVM does not have the required security providers
for the message digest.public void visitAttributePre(TXAttribute attribute) throws LibraryException
A digest of a TXAttribute Node consists of its Node type, its name, and its value.
Note that TXAttribute Nodes are not parsed into the document object hierarchy by the XML4J parser; attributes exist as part of a TXElement Node.
attribute
- Node to calculate and set a digest.
UnicodeBigUnmarked
encoding,
or the JVM does not have the required security providers
for the message digest.public void visitPIPre(TXPI pi) throws LibraryException
A digest of a TXPI Node consists of its Node type, its name, and its data.
pi
- Node to calculate and set a digest.
UnicodeBigUnmarked
encoding,
or the JVM does not have the required security providers
for the message digest.public void visitCommentPre(TXComment comment) throws LibraryException
A digest of a TXComment Node consists of its Node type and its data.
comment
- Node to calculate and set a digest.
UnicodeBigUnmarked
encoding,
or the JVM does not have the required security providers
for the message digest.public void visitTextPre(TXText text) throws LibraryException
A digest of a TXText Node consists of its Node type and its data.
text
- Node to calculate and set a digest.
UnicodeBigUnmarked
encoding,
or the JVM does not have the required security providers
for the message digest.Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |