|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.html.DomNode
com.gargoylesoftware.htmlunit.html.DomNamespaceNode
com.gargoylesoftware.htmlunit.html.DomAttr
public class DomAttr
An attribute of an element. Attributes are stored in HtmlElement
,
but the XPath engine expects attributes to be in a DomNode
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode> |
Field Summary |
---|
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
AS_TEXT_BLANK, AS_TEXT_BLOCK_SEPARATOR, AS_TEXT_NEW_LINE, AS_TEXT_TAB, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED |
Constructor Summary | |
---|---|
DomAttr(SgmlPage page,
String namespaceURI,
String qualifiedName,
String value,
boolean specified)
Instantiate a new attribute. |
Method Summary | |
---|---|
String |
getCanonicalXPath()
Returns the canonical XPath expression which identifies this node, for instance "/html/body/table[3]/tbody/tr[5]/td[2]/span/a[3]". |
String |
getName()
|
String |
getNodeName()
Returns this node's node name. |
short |
getNodeType()
Returns this node's node type. |
String |
getNodeValue()
|
DomElement |
getOwnerElement()
|
TypeInfo |
getSchemaTypeInfo()
Not yet implemented. |
boolean |
getSpecified()
|
String |
getTextContent()
|
String |
getValue()
|
boolean |
isId()
|
void |
setNodeValue(String value)
|
void |
setTextContent(String textContent)
|
void |
setValue(String value)
|
String |
toString()
|
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode |
---|
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setUserData |
Constructor Detail |
---|
public DomAttr(SgmlPage page, String namespaceURI, String qualifiedName, String value, boolean specified)
page
- the page that the attribute belongs tonamespaceURI
- the namespace that defines the attribute name (may be null)qualifiedName
- the name of the attributevalue
- the value of the attributespecified
- true if this attribute was explicitly given a value in the source document,
or if the application changed the value of the attributeMethod Detail |
---|
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class DomNode
public String getNodeName()
getNodeName
in interface Node
getNodeName
in class DomNode
public String getNodeValue()
getNodeValue
in interface Node
getNodeValue
in class DomNode
public String getName()
getName
in interface Attr
public String getValue()
getValue
in interface Attr
public void setNodeValue(String value)
setNodeValue
in interface Node
setNodeValue
in class DomNode
public void setValue(String value)
setValue
in interface Attr
public DomElement getOwnerElement()
getOwnerElement
in interface Attr
public boolean getSpecified()
getSpecified
in interface Attr
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Attr
public boolean isId()
isId
in interface Attr
public String toString()
toString
in class Object
public String getCanonicalXPath()
Returns the canonical XPath expression which identifies this node, for instance "/html/body/table[3]/tbody/tr[5]/td[2]/span/a[3]".
WARNING: This sort of automated XPath expression is often quite bad at identifying a node, as it is highly sensitive to changes in the DOM tree.
getCanonicalXPath
in class DomNode
DomNode.getByXPath(String)
public String getTextContent()
getTextContent
in interface Node
getTextContent
in class DomNode
public void setTextContent(String textContent)
setTextContent
in interface Node
setTextContent
in class DomNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |