Contents | Package | Class | Tree | Deprecated | Index | Help XML for Java 1.0.4
PREV | NEXT SHOW LISTS | HIDE LISTS

Class com.ibm.xml.parser.TXComment

java.lang.Object
    |
    +----com.ibm.xml.parser.Child
            |
            +----com.ibm.xml.parser.TXComment
Subclasses:
TreeFactory.TreeComment

public class TXComment
extends Child
implements Comment
The TXComment class implements the Comment interface as defined by the Document Object Model (DOM).

A TXComment Node represents the content of a comment, i.e. all the characters between the starting '<!--' and ending '-->'.

Version:
Revision: 34 1.6 src/com/ibm/xml/parser/TXComment.java, xml4jsrc, xml4j-jtcsv, xml4j_1_0_4
See Also:
Comment, Child

Fields inherited from class com.ibm.xml.parser.Child
 ATTDEF, ATTLIST, DOCUMENTTYPE, ELEMENTDEFINITION, ENTITY, GENERALREFERENCE, NOTATION, PSEUDONODE
 

Constructor Summary
 TXComment(java.lang.String data)
Constructor.
 

Method Summary
void  acceptPost(Visitor visitor)
Implements the accept operation of the visitor design pattern when the end of a TXComment Node is recognized when traversing the document object tree.
void  acceptPre(Visitor visitor)
Implements the accept operation of the visitor design pattern when the start of a TXComment Node is recognized when traversing the document object tree.
java.lang.Object  clone()
Clone this Comment Node using the appropriate factory.
java.lang.String  getData()
Returns the actual content of the Comment Node.
int  getNodeType()
Returns that this object is a Comment Node.
java.lang.String  getText()
Return all text associated with this Node without considering entities.
void  setData(java.lang.String data)
Sets the actual content of the Comment Node.
 
Methods inherited from class com.ibm.xml.parser.Child
 clearDigest, clone, getChildNodes, getDigest, getFactory, getFirstChild, getNextSibling, getParentNode, getPreviousSibling, getText, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, toXMLString, toXMLString
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TXComment

public TXComment(java.lang.String data)
Constructor.
Parameters:
data - The actual content of the Comment Node.
Method Detail

clone

public java.lang.Object clone()
Clone this Comment Node using the appropriate factory.

This method is defined by Child.

Returns:
Cloned Comment Node.
Overrides:
clone in class Child
See Also:
clone

getNodeType

public int getNodeType()
Returns that this object is a Comment Node.

This method is defined by DOM.

Returns:
Comment Node indicator.

getData

public java.lang.String getData()
Returns the actual content of the Comment Node.
Implements:
getData in interface Comment
Returns:
The actual content of the Comment Node, or null if no data.
See Also:
setData

setData

public void setData(java.lang.String data)
Sets the actual content of the Comment Node.
Implements:
setData in interface Comment
Parameters:
data - The actual content of the Comment Node.
See Also:
getData

getText

public java.lang.String getText()
Return all text associated with this Node without considering entities.

This method is defined by Child.

Returns:
Always returns "".
Overrides:
getText in class Child
See Also:
toXMLString

acceptPre

public void acceptPre(Visitor visitor) throws java.lang.Exception
Implements the accept operation of the visitor design pattern when the start of a TXComment Node is recognized when traversing the document object tree.
Parameters:
visitor - The implemention of the Visitor operation (toXMLString, digest, ...)
Throws:
java.lang.Exception - Thrown if this Node can not be visitted, or traversal modification is requested.
See Also:
Visitor, TreeTraversal, NonRecursivePreorderTreeTraversal, TreeTraversalException

acceptPost

public void acceptPost(Visitor visitor) throws java.lang.Exception
Implements the accept operation of the visitor design pattern when the end of a TXComment Node is recognized when traversing the document object tree.
Parameters:
visitor - The implemention of the Visitor operation (toXMLString, digest, ...)
Throws:
java.lang.Exception - Thrown if this Node can not be visitted, or traversal modification is requested.
See Also:
Visitor, TreeTraversal, NonRecursivePreorderTreeTraversal, TreeTraversalException

Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS