|
||||||||||
| 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.DomElement
public class DomElement
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
|---|
DomNode.ChildIterator, DomNode.DescendantElementsIterator |
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTE_NOT_DEFINED
Constant meaning that the specified attribute was not defined. |
static java.lang.String |
ATTRIBUTE_VALUE_EMPTY
Constant meaning that the specified attribute was found but its value was empty. |
| 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 |
| Fields inherited from interface org.w3c.dom.Node |
|---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Constructor Summary | |
|---|---|
DomElement(java.lang.String namespaceURI,
java.lang.String qualifiedName,
SgmlPage page,
java.util.Map<java.lang.String,DomAttr> attributes)
Creates an instance of a DOM element that can have a namespace. |
|
| Method Summary | |
|---|---|
DomNode |
cloneNode(boolean deep)
|
java.lang.String |
getAttribute(java.lang.String attributeName)
Returns the value of the attribute specified by name or an empty string. |
org.w3c.dom.Attr |
getAttributeNode(java.lang.String name)
Not yet implemented. |
org.w3c.dom.Attr |
getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
Not yet implemented. |
java.lang.String |
getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Returns the value of the attribute specified by namespace and local name or an empty string. |
org.w3c.dom.NamedNodeMap |
getAttributes()
|
java.util.Map<java.lang.String,DomAttr> |
getAttributesMap()
Returns the map holding the attributes, keyed by name. |
DomNodeList<HtmlElement> |
getElementsByTagName(java.lang.String tagName)
|
DomNodeList<HtmlElement> |
getElementsByTagNameNS(java.lang.String namespace,
java.lang.String localName)
Not yet implemented. |
java.lang.String |
getNodeName()
Returns this node's node name. |
short |
getNodeType()
Returns this node's node type. |
org.w3c.dom.TypeInfo |
getSchemaTypeInfo()
Not yet implemented. |
java.lang.String |
getTagName()
Returns the tag name of this element. |
boolean |
hasAttribute(java.lang.String attributeName)
Returns whether the attribute specified by name has a value. |
boolean |
hasAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Returns whether the attribute specified by namespace and local name has a value. |
boolean |
hasAttributes()
|
protected boolean |
isAttributeCaseSensitive()
Indicates if the attribute names are case sensitive. |
protected boolean |
isEmptyXmlTagExpanded()
Indicates if a node without children should be written in expanded form as XML (i.e. |
protected java.util.Map<java.lang.String,java.lang.String> |
namespaces()
Returns namespaces. |
protected void |
printOpeningTagContentAsXml(java.io.PrintWriter printWriter)
Prints the content between "<" and ">" (or "/>") in the output of the tag name and its attributes in XML format. |
protected void |
printXml(java.lang.String indent,
java.io.PrintWriter printWriter)
Recursively write the XML data for the node tree starting at node. |
void |
removeAttribute(java.lang.String attributeName)
Removes an attribute specified by name from this element. |
org.w3c.dom.Attr |
removeAttributeNode(org.w3c.dom.Attr attribute)
Not yet implemented. |
void |
removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Removes an attribute specified by namespace and local name from this element. |
void |
setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Sets the value of the attribute specified by name. |
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr attribute)
Not yet implemented. |
org.w3c.dom.Attr |
setAttributeNodeNS(org.w3c.dom.Attr attribute)
Not yet implemented. |
void |
setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String attributeValue)
Sets the value of the attribute specified by namespace and qualified name. |
void |
setIdAttribute(java.lang.String name,
boolean isId)
Not yet implemented. |
void |
setIdAttributeNode(org.w3c.dom.Attr idAttr,
boolean isId)
Not yet implemented. |
void |
setIdAttributeNS(java.lang.String namespaceURI,
java.lang.String localName,
boolean isId)
Not yet implemented. |
| 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, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| Field Detail |
|---|
public static final java.lang.String ATTRIBUTE_NOT_DEFINED
public static final java.lang.String ATTRIBUTE_VALUE_EMPTY
| Constructor Detail |
|---|
public DomElement(java.lang.String namespaceURI,
java.lang.String qualifiedName,
SgmlPage page,
java.util.Map<java.lang.String,DomAttr> attributes)
namespaceURI - the URI that identifies an XML namespacequalifiedName - the qualified name of the element type to instantiatepage - the page that contains this elementattributes - a map ready initialized with the attributes for this element, or
null. The map will be stored as is, not copied.| Method Detail |
|---|
public java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.NodegetNodeName in class DomNodepublic final short getNodeType()
getNodeType in interface org.w3c.dom.NodegetNodeType in class DomNodeprotected java.util.Map<java.lang.String,java.lang.String> namespaces()
public final java.lang.String getTagName()
getTagName in interface org.w3c.dom.Elementpublic final boolean hasAttributes()
hasAttributes in interface org.w3c.dom.NodehasAttributes in class DomNodepublic boolean hasAttribute(java.lang.String attributeName)
hasAttribute in interface org.w3c.dom.ElementattributeName - the name of the attribute
protected void printOpeningTagContentAsXml(java.io.PrintWriter printWriter)
printWriter - the writer to print in
protected void printXml(java.lang.String indent,
java.io.PrintWriter printWriter)
node.
printXml in class DomNodeindent - white space to indent child nodesprintWriter - writer where child nodes are writtenprotected boolean isEmptyXmlTagExpanded()
false by defaultpublic java.lang.String getAttribute(java.lang.String attributeName)
ATTRIBUTE_NOT_DEFINED
if the attribute wasn't specified or ATTRIBUTE_VALUE_EMPTY if the
attribute was specified but it was empty.
getAttribute in interface org.w3c.dom.ElementattributeName - the name of the attribute
ATTRIBUTE_NOT_DEFINED or ATTRIBUTE_VALUE_EMPTYpublic void removeAttribute(java.lang.String attributeName)
removeAttribute in interface org.w3c.dom.ElementattributeName - the attribute attributeName
public final void removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
removeAttributeNS in interface org.w3c.dom.ElementnamespaceURI - the URI that identifies an XML namespacelocalName - the name within the namespacepublic final org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr attribute)
removeAttributeNode in interface org.w3c.dom.Element
public final boolean hasAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
hasAttributeNS in interface org.w3c.dom.ElementnamespaceURI - the URI that identifies an XML namespacelocalName - the name within the namespace
public final java.util.Map<java.lang.String,DomAttr> getAttributesMap()
public org.w3c.dom.NamedNodeMap getAttributes()
getAttributes in interface org.w3c.dom.NodegetAttributes in class DomNode
public final void setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
setAttribute in interface org.w3c.dom.ElementattributeName - the name of the attributeattributeValue - the value of the attribute
public void setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String attributeValue)
setAttributeNS in interface org.w3c.dom.ElementnamespaceURI - the URI that identifies an XML namespacequalifiedName - the qualified name (prefix:local) of the attributeattributeValue - the value of the attributeprotected boolean isAttributeCaseSensitive()
true
public final java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
ATTRIBUTE_NOT_DEFINED
if the attribute wasn't specified or ATTRIBUTE_VALUE_EMPTY if the
attribute was specified but it was empty.
getAttributeNS in interface org.w3c.dom.ElementnamespaceURI - the URI that identifies an XML namespacelocalName - the name within the namespace
ATTRIBUTE_NOT_DEFINED or ATTRIBUTE_VALUE_EMPTYpublic org.w3c.dom.Attr getAttributeNode(java.lang.String name)
getAttributeNode in interface org.w3c.dom.Element
public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
getAttributeNodeNS in interface org.w3c.dom.Elementpublic DomNodeList<HtmlElement> getElementsByTagName(java.lang.String tagName)
getElementsByTagName in interface org.w3c.dom.Element
public DomNodeList<HtmlElement> getElementsByTagNameNS(java.lang.String namespace,
java.lang.String localName)
getElementsByTagNameNS in interface org.w3c.dom.Elementpublic org.w3c.dom.TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface org.w3c.dom.Element
public void setIdAttribute(java.lang.String name,
boolean isId)
setIdAttribute in interface org.w3c.dom.Element
public void setIdAttributeNS(java.lang.String namespaceURI,
java.lang.String localName,
boolean isId)
setIdAttributeNS in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attribute)
setAttributeNode in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attribute)
setAttributeNodeNS in interface org.w3c.dom.Element
public final void setIdAttributeNode(org.w3c.dom.Attr idAttr,
boolean isId)
setIdAttributeNode in interface org.w3c.dom.Elementpublic DomNode cloneNode(boolean deep)
cloneNode in interface org.w3c.dom.NodecloneNode in class DomNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||