com.gargoylesoftware.htmlunit.html
Class DomComment

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomCharacterData
          extended by com.gargoylesoftware.htmlunit.html.DomComment
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class DomComment
extends DomCharacterData

Wrapper for the DOM node Comment.

Version:
$Revision: 1.3 $
Author:
Karel Kolman, Ahmed Ashour
See Also:
Serialized Form

Field Summary
static java.lang.String NODE_NAME
 the symbolic node name
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
 
Constructor Summary
DomComment(HtmlPage page, java.lang.String data)
 Create an instance of DomComment
 
Method Summary
 java.lang.String asText()
 Returns a text representation of this element that represents what would be visible to the user if this page was shown in a web browser.
 java.lang.String getNodeName()
 Get the name for the current node.
 short getNodeType()
 Get the type of the current node.
 java.lang.String toString()
 Gives a simple representation to facilitate debugging
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomCharacterData
appendData, deleteData, getData, getLength, getNodeValue, insertData, replaceData, setData, setNodeValue, substringData
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, appendDomChild, asXml, cloneDomNode, getAllHtmlChildElements, getByXPath, getChildIterator, getEndColumnNumber, getEndLineNumber, getEventHandler, getFirstDomChild, getLastDomChild, getNextDomSibling, getPage, getParentDomNode, getPreviousDomSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, remove, removeAllChildren, removeDomChangeListener, removeEventHandler, replace, setEventHandler, setEventHandler, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_NAME

public static final java.lang.String NODE_NAME
the symbolic node name

See Also:
Constant Field Values
Constructor Detail

DomComment

public DomComment(HtmlPage page,
                  java.lang.String data)
Create an instance of DomComment

Parameters:
page - The HtmlPage that contains this element.
data - the string data held by this node
Method Detail

asText

public java.lang.String asText()
Returns a text representation of this element that represents what would be visible to the user if this page was shown in a web browser. For example, a single-selection select element would return the currently selected value as text.

Overrides:
asText in class DomNode
Returns:
The element as text.

getNodeName

public java.lang.String getNodeName()
Description copied from class: DomNode
Get the name for the current node.

Specified by:
getNodeName in class DomNode
Returns:
the node name, in this case NODE_NAME

getNodeType

public short getNodeType()
Description copied from class: DomNode
Get the type of the current node.

Specified by:
getNodeType in class DomNode
Returns:
the node type constant, in this case Node.COMMENT_NODE

toString

public java.lang.String toString()
Gives a simple representation to facilitate debugging

Overrides:
toString in class java.lang.Object
Returns:
a simple representation


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.